View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default Lookup when value is between 2 columns

See if these work for you.

=VLOOKUP(F9,B9:C11,2,1)

Where F9 is the lookup value.
B9:B11 = 1, 5, 10.
C9:C11 = Yes, Yes, No.

OR

=LOOKUP(F9,{1,5,10},{"Yes","Yes","No"})

Whe
F9 = 1 to 4 returns Yes.
F9 = 5 to 9 returns Yes.
F9 = 9 or returns No.

HTH
Regards,
Howard

"Yegod" wrote in message
...
Hi,

I need to lookup a column if the value is between the first 2 columns

Col 1 Col2 Col3 Col 4
1 5 Yes 10
6 10 Yes 20
11 15 No 30

If the value I am looking up is 7, I need to return Yes from Col 3. So if
value is between col 1 and col 2, return Col 3. I was able to get Col 4
using
Sum (if..) but do not know how to return the text in Col 3

Thanks in advance..