Vlookup result #N/A

P

Pablo

When I am using the Vlookup function (false) and the
reference item as a empty value I get a result of #N/A.
Is there a way to set the #N/A to blank?

Thanks,
 
P

Peo Sjoblom

One way

=IF(ISNUMBER(MATCH(A1,B2:B100,0)),VLOOKUP(A1,B2:C100,2,0),"")


where A1 is the lookup value and B2:C100 the table, last 0 equals FALSE
tells excel that if there is no match in the leftmost column of the table,
return blank cell,
if match do the lookup
 
Y

Yup

For example:

=IF(ISERROR(VLOOKUP(A1,$A$1:$B$10,2,FALSE)),"",(VLOOKUP(A1,$A$1:$B$10,2,FALS
E)))

Is this what you mean?
 
J

J.E. McGimpsey

Better to use

=IF(ISNA(VLOOKUP(...)),"",VLOOKUP(...))

since ISERROR will be TRUE not only for #N/A errors, but also
#VALUE!, #REF etc. errors.

Also note that it's slightly faster to use

=IF(ISNA(MATCH(A1,$A$10, FALSE)),"",VLOOKUP(...))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top