Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Lookup function when 'lookup_value' does not always exists

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Lookup function when 'lookup_value' does not always exists

One way:

A1 = lookup value

B1:B10 is lookup array

=IF(COUNTIF(B1:B10,A1),LOOKUP(......),"what do you want to happen if the LU
value doesn't exist")

--
Biff
Microsoft Excel MVP


"Ken King" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Lookup function when 'lookup_value' does not always exists

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)

"Ken King" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOK up returning #N/A even though value exists in lookup array [email protected] Excel Worksheet Functions 1 September 4th 07 06:56 PM
Lookup value - see if exists in another array [email protected] Excel Worksheet Functions 1 March 1st 07 03:55 PM
How to make LOOKUP give zero if it can't find the lookup_value? Dmitry Kopnichev Links and Linking in Excel 3 October 12th 05 09:47 PM
How to make LOOKUP give zero if it can't find the lookup_value? Dmitry Kopnichev Excel Worksheet Functions 3 October 12th 05 09:47 PM
Need help with a function I'm not sure exists Cervantes Excel Worksheet Functions 7 August 16th 05 06:38 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"