VLookup question

  • Thread starter Thread starter mac
  • Start date Start date
M

mac

I'm creating a report in excel using =vlookup to pull data from another
tab. When the vlookup cannot find a value it returns a #N/A. Is there a
formula I can create so when it cannot find the value it gives me a 0 or a
"" instead of the #N/A?

thanks,
mac
 
Try these:

=IF(ISNA(VLOOKUP(F1,Sheet2!A1:B3,2,0)),0,VLOOKUP(F1,Sheet2!A1:B3,2,0))

For 0...

=IF(ISNA(VLOOKUP(F1,Sheet2!A1:B3,2,""),0,VLOOKUP(F1,Sheet2!A1:B3,2,0))

For 'nothing'

HTH
Regards,
Howard
 
Hi Mac,

=IF(ISNA(VLOOKUP(C2,$A$2:$A$125,1,FALSE)),"",VLOOKUP(C2,$A$2:$A$125,1,FALSE))
 
Hello Howard,

The table array (Sheet2!A1:B3) in Vlookup should always be absolute
(Sheet2!$A$1:$B$3) otherwise the table changes it when the formula is copied
down the column.
 
Back
Top