Lookup function when 'lookup_value' does not always exists

K

Ken King

I am using the LOOKUP funtion for an array. Of my 300+ values I know that
about 20 'lookup_value'(s) don't exists in the array, but I don't want it to
find the next closest value. How can I test my array to see if the
'lookup_value' exists?
Thanks,
Ken
 
S

Sheeloo

Consider using VLOOKUP...

if your values are in COL A and value to lookup is in B1 then use
=VLOOKUP(B1,A:A,1,False)
it will give you #N/A if the value is not found...
you can test with ISNA() which will give you TRUE when value is not found.
Values in Col A need not be sorted...

VLOOKUP with last parameter as TRUE gives you the closes match (and values
have to be sorted)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top