Alternative for Vlookup output of #N/A if data not found?

M

mcmilja

Hello,

Is there an alternative for the Vlookup function output of #N/A when data is
not found? The reason I ask is because I need to use an If function based on
the Vlookup output if the data is not found such as =IF(K2="#N/A","SPARE",)
but the function does not recognize #N/A.

Thanks!
Jaret
 
D

Dave Peterson

=if(isna(k2),"it's an n/a error","it's not an n/a error")

But you can do the same kind of thing in your =vlookup() formula:

=if(isna(vlookup(...)),"it's an error",vlookup(...))

And if you're using xl2007, you can look at =iferror() in excel's help.
 
D

David Biddulph

Your formula is looking for the text string #N/A (the quote marks tell it to
look for a text string).

Try =IF(ISNA(K2),"SPARE",)
 
M

mcmilja

Thank You!

David Biddulph said:
Your formula is looking for the text string #N/A (the quote marks tell it to
look for a text string).

Try =IF(ISNA(K2),"SPARE",)
 
M

mcmilja

Thanks! This did the trick...

Dave Peterson said:
=if(isna(k2),"it's an n/a error","it's not an n/a error")

But you can do the same kind of thing in your =vlookup() formula:

=if(isna(vlookup(...)),"it's an error",vlookup(...))

And if you're using xl2007, you can look at =iferror() in excel's help.
 

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

Top