ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup (https://www.excelbanter.com/excel-worksheet-functions/132078-vlookup.html)

Ashley

Vlookup
 
HI,
This is my formula. It works fine. But instead of #N/A if there is not an
exact match. I would like to put a text "invalid". How to add the text to
this formula.
=VLOOKUP(D41,$W$37:$X$47,2,FALSE)

Thanks

JE McGimpsey

Vlookup
 
One way:

=IF(ISNA(VLOOKUP(...)),"invalid",VLOOKUP(...))


In article ,
ashley wrote:

HI,
This is my formula. It works fine. But instead of #N/A if there is not an
exact match. I would like to put a text "invalid". How to add the text to
this formula.
=VLOOKUP(D41,$W$37:$X$47,2,FALSE)

Thanks


Ron Coderre

Vlookup
 
Try something like this:

=IF(ISNA(VLOOKUP(D41,$W$37:$X$47,2,FALSE)),"Invali d",VLOOKUP(D41,$W$37:$X$47,2,FALSE))

or....maybe this:
=IF(COUNTIF(D41,$W$37:$W$47),VLOOKUP(D41,$W$37:$X$ 47,2,FALSE),"Invalid")

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"ashley" wrote:

HI,
This is my formula. It works fine. But instead of #N/A if there is not an
exact match. I would like to put a text "invalid". How to add the text to
this formula.
=VLOOKUP(D41,$W$37:$X$47,2,FALSE)

Thanks


Dave F

Vlookup
 
If you're using Excel 2007, you can use the function =IFERROR(VLOOKUP([your
vlookup]),"invalid")

Else, the other responses will do what you want.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"ashley" wrote:

HI,
This is my formula. It works fine. But instead of #N/A if there is not an
exact match. I would like to put a text "invalid". How to add the text to
this formula.
=VLOOKUP(D41,$W$37:$X$47,2,FALSE)

Thanks


JE McGimpsey

Vlookup
 
Just be aware that this will mask errors other than #N/A...

In article ,
Dave F wrote:

If you're using Excel 2007, you can use the function =IFERROR(VLOOKUP([your
vlookup]),"invalid")



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

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