If condition not met get #N/A

C

Cefoxtrot

Using the VLOOKUP function to merge data from two worksheets:
=vlookup(A2,sheet1!$A$2:$M$3000,13,FALSE)

It works fine, except that when there is no match, I get a #N/A on each as
the result. Is there a way to prevent the '#N/A' from displaying? Or replace
it blanks?

Thanks!
Cefoxtrot
 
T

T. Valko

If you're using Excel 2007:

=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$M$3000,13,0),"")

This works in any version:

=IF(COUNTIF(Sheet1$A$2:$A$3000,A2),VLOOKUP(A2,Sheet1!$A$2:$M$3000,13,0),"")
 

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