MrExcel Publishing
Your One Stop for Excel Tips & Solutions


Posted by Paul Haley on July 10, 2001 1:13 AM

How can I get a vlookup to look for an exact match in a table and if it is not there don't go to the nearest one but return text saying "not found".

I have done this before using "isnamatch" I think but can't remember.



Posted by Aladin Akyurek on July 10, 2001 1:50 AM

=IF(ISNA(VLOOKUP(lookup-value,lookup-table,column,0)),"Not found",VLOOKUP(lookup-value,lookup-table,column,0))

0 means FALSE means exact match.

Another, nicer, way:

=IF(ISNUMBER(MATCH(A1,$D$1:$D$10,0),VLOOKUP(A1,$D$1:$E$10,2,0),"Not Found")