Archive for July 17th, 2007

AND versus VLOOKUP with If function in Microsoft Excel

Tuesday, July 17th, 2007

AND vs. VLOOKUP

Do we have to use AND function or VLOOKUP function ?
The answer depends on the case that we have.
To see the example, I tried to make an experiment using AND and VLOOKUP funtion to solve simple case.

From this experiment I found the same result, although I used two different formula.
The formula I use to fill up cell C5 by using AND function:
=IF(AND(B5>=85,B5<=100),"A",IF(AND(B5>=70,B5<=84),"B",
IF(AND(B5>=60,B5<=69),"C","D")))

I use Table 1 just to make formula easier to read, so this formula does not have to do with Table 1.
To fill up cell F5, I used Table 2 for VLOOKUP function:
=IF(E5>100,”Too big”,VLOOKUP(E5,$E$14:$F$17,2))
And again which function is easier. The decision is yours.