ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   #N/A in vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/86685-n-vlookup.html)

Sweepea

#N/A in vlookup
 
How to fix #N/A if vlookup can't find a match to the lookup value.

For example,

Array = D1:E2
D1:E2 =
Apple 1
Orange 2

Lookup value = A1
A1 = Pear

vlookup(A1, D1:E2, 2,0)

Result will return as #N/A since "Pear" cannot be found in the array.

Question: how do I set it to blank or 0 if it's #N/A?

Please help! Thank you.

Bernard Liengme

#N/A in vlookup
 
Try =IF(ISNA(vlookup(A1, D1:E2, 2,0)),"not found", vlookup(A1, D1:E2, 2,0))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Sweepea" wrote in message
...
How to fix #N/A if vlookup can't find a match to the lookup value.

For example,

Array = D1:E2
D1:E2 =
Apple 1
Orange 2

Lookup value = A1
A1 = Pear

vlookup(A1, D1:E2, 2,0)

Result will return as #N/A since "Pear" cannot be found in the array.

Question: how do I set it to blank or 0 if it's #N/A?

Please help! Thank you.




Sweepea

#N/A in vlookup
 
Thanks so much, Bernard. It works!!!!


"Bernard Liengme" wrote:

Try =IF(ISNA(vlookup(A1, D1:E2, 2,0)),"not found", vlookup(A1, D1:E2, 2,0))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Sweepea" wrote in message
...
How to fix #N/A if vlookup can't find a match to the lookup value.

For example,

Array = D1:E2
D1:E2 =
Apple 1
Orange 2

Lookup value = A1
A1 = Pear

vlookup(A1, D1:E2, 2,0)

Result will return as #N/A since "Pear" cannot be found in the array.

Question: how do I set it to blank or 0 if it's #N/A?

Please help! Thank you.






All times are GMT +1. The time now is 04:17 AM.

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