Hi, I have an excel file, I would do vlookup for 3 columns(nonconsecutive). However, if the value is ‘#N/A’, I need to do another vlookup. Thus, i need to convert the formula to value.
You can nest vlookups
something like “=IFERROR(vlookup1, vlookup2)”
In this case, if first vlookup returns an error like #N/A, it will go to second vlookup. So the whole thing can be done in a single step.
refer Excel formula: Multiple chained VLOOKUPs | Exceljet for more info on this
Hope this helps
Hi @farhan94, sounds like a great idea and I tried.
“=IFERROR(=VLOOKUP(N”+POS+“,‘C:\Users\IHL2016\Documents\UiPath\Project5[Sample - Check for outstanding PO from old GeBIZ.xlsx]Sheet1’!$A:$H,4,FALSE), =VLOOKUP(N”+POS+“,‘C:\Users\IHL2016\Documents\UiPath\Project5[Sample - Check for outstanding II from GeBIZ 2.0.xlsx]Sheet1’!$A:$H,5,FALSE))”
However, it isn’t working as expected. The excel get errors.
“=” sign should be used only at the beginning of the formula. you have used “=” sign before ‘VLOOKUP’ which is wrong
make sure both vlookups are working when you run them separately. Then simply add them to the if condition.
=IFERROR(here you write the whole vlookup formula without = sign,here you write the second one)