ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   removing #NA from the list (https://www.excelbanter.com/excel-programming/397680-removing-na-list.html)

Neall

removing #NA from the list
 
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
--
Neall

Jim Thomlinson

removing #NA from the list
 
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))

--
HTH...

Jim Thomlinson


"Neall" wrote:

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
--
Neall


Neall

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

Any suggestions?

--
Neall


"Jim Thomlinson" wrote:

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))

--
HTH...

Jim Thomlinson


"Neall" wrote:

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
--
Neall



All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com