removing #NA from the list

G

Guest

I am pulling in data from a DB, and in one of the rows I am using a VLOOKUP
which works perfectly, however with the expectation of added growth and to
not have to worry about adding this syntax later on in the project I have
cells that have no data in them the the VLOOKUP uses, so the results are
showing #N/A

Is there anyway I can make it so those results do not show?

here is the syntaxt

=VLOOKUP(YYY!B17,'XX-XX'!A17:F166,2,FALSE)

the cell where the VLOOKUP resides that does not have data in the cells it
is looking up comes back with a #N/A display on the spreadsheet and its not
"purdy"


Thanks in advance
 
G

Guest

Try this which checks for a match prior to doing the lookup...

=if(countif('XX-XX'!A17:A166, YYY!B17) = 0, "",
VLOOKUP(YYY!B17,'XX-XX'!A17:F166,2,FALSE))
 
G

Guest

Thanks, it works for removing the #N/A but it doesn't display the result if
the criteria is matched.

Any suggestions?
 

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