Vlookup

A

ashley

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
 
R

Ron Coderre

Try something like this:

=IF(ISNA(VLOOKUP(D41,$W$37:$X$47,2,FALSE)),"Invalid",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
 
D

Dave F

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
 
Top