Google Drive Spreadsheets: Combining IF and VLOOKUP

user2761030 picture user2761030 · Nov 21, 2013 · Viewed 32.1k times · Source

I'm trying to work out a formula for combining an IF statement and a VLOOPUP.

Basically, I want the formula to return a value if a value was found through VLOOKUP, or to return something else if not found...

I have experimented with

=IF(VLOOKUP(A1,$B$2:$B$31, 1, 0),"FOUND","NOT FOUND!")

... but this doesn't seem to work.

Many thanks for any thoughts you might have...

Answer

mvinayakam picture mvinayakam · Oct 31, 2014

An old thread but would like to submit a cleaner solution for the Vlookup example or places where you want to use the value returned by a formula-

=IFERROR(VLOOKUP(A1,$B$2:$B$31, 1, 0),"NOT FOUND")