Loop vlookup until the good data with a formula in an excel report

Sometimes using 1 vlookup doesn’t give the result I want because I need to check that different conditions are good first. In such situation, I need to loop inside the first vlookup another vlookup and so on until all checks are OK so I can get the correct result.

formula excel


When I use the formula ?

Each time I need to validate different conditions to get the correct data.


How to use the formula ?

The formula in this topic is with "," so depending of the operating system of your PC, the formula should have ";" instead of ",".


How are the formulas ?



The formula for 1 condition in column E:

=IF(VLOOKUP(A2,A:A,1,0)="chocolate",IF(VLOOKUP(C2,C:C,1,0)="candy","good","not good"),"not good")

The formula for 2 conditions in column F:

=IF(VLOOKUP(A2,A:A,1,0)="chocolate",IF(VLOOKUP(C2,C:C,1,0)="candy",IF(VLOOKUP(B2,B:B,1,0)="cake","good","not good"),"not good"),"not good")

Interesting Management