Hi all,
I’m facing issue with getting required output from excel file using some conditions.
I have excel data like this
I need to split each keyword in 2nd column and check particular keyword. if keyword existed i need to take column 1 value as output. If we found keyword multiple times. we need to take all mapped ones.
Input string - Banking
output - Banking, Financial Services & Insurance
but i’m getting Investment Bank also in output because it contains ‘Investment Banking’ in B column
I have developed code like this
read excel sheet - output - dt_CurrentIndustry
creating dictionary - marketDictCurrentIndustry
marketDictCurrentIndustry = dt_CurrentIndustry.AsEnumerable.ToDictionary(Function(x) x(“Industries in SalesForce (Current Industry)”).ToString, Function(y) String.Join(“,”, y.ItemArray()))
If(marketDictCurrentIndustry.Where(Function(x) x.Value.ToUpper.Contains(str_GetPriorIndustries.ToUpper.Trim)).Count > 0, string.join( “;”, marketDictCurrentIndustry.Where(Function(x) x.Value…ToUpper.Contains(str_GetPriorIndustries.ToUpper.Trim)).ToList.ConvertAll(function(x) x.key)) & “;” & IndustryType, IndustryType)