How to run a Vlook - up for multiple scenario

excel

#1

I am trying to simulate Vlook-up of a datatable. But I am not able to run it for multiple items (which needs to be looked up). Can any one suggest me way out!VLookup.xaml (16.2 KB)


#2

Please find the input excel sheet


#3

Your datatable.selct method can contain multiple criteria so you could do something like
dtInput.Select("[Name] = ‘King’ or [Name] = ‘Queen’]") as an example. To build this string up you can store your input excel in a separate datatable and then loop of that. This is assuming you want to find this in a single select method and not loop as you are doing.


#4

Thanks Andrew for your approach. I removed the use of selectstring, instead I provided direct value of variable. So it was able to find the index and move forward


#5

#6

Thank you for the example @badita. I extended the example to cover vlookup between 2 tables with output to a 3rd table (attached)VLookupUip.zip (9.3 KB)