ExcelBanter

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

Joe M.

VLOOKUP #N/A result
 
When VLOOKUP fails to find a match the result #N/A is shown. Is there a way
to have another result displayed such as NOT FOUND or NO?

Thanks,
Joe M

Stephane Quenson

VLOOKUP #N/A result
 
You have to test the result of the VLOOKUP first with the ISNA function, then
decide what to do. Example:
=IF(ISNA(VLOOKUP(6,E14:F18,2,0)), "Not Found", VLOOKUP(6,E14:F18,2,0))


Chip Pearson

VLOOKUP #N/A result
 
Use a formula like:

=IF(ISERROR(VLOOKUP(...)),"NOT FOUND",VLOOKUP(...))

In Excel 2007, you can use the new IFERROR function.

=IFERROR(VLOOKUP(...),"NOT FOUND")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Joe M." wrote in message
...
When VLOOKUP fails to find a match the result #N/A is shown. Is there a
way
to have another result displayed such as NOT FOUND or NO?

Thanks,
Joe M




All times are GMT +1. The time now is 05:29 PM.

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