Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Lookup when value is between 2 columns

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..
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Lookup when value is between 2 columns

If column 1 is in E2 and Col 2 is F2 Col 3 =

=IF(OR(E2<=$G$1,F2<=$G$1),"Yes","No")

For column 4 I used

=(INT(MAX(E2:F2)/$G$1)+1)*10

G1 is the number to divide by.

HTH
Peter

"Yegod" wrote:

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..

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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..



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Lookup when value is between 2 columns

Try

Here 7 is the lookup value

=LOOKUP(7,A1:A10,C1:C10)

--
Jacob (MVP - Excel)


"Yegod" wrote:

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..

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Lookup when value is between 2 columns

Thank you all, I used lookup.

"Jacob Skaria" wrote:

Try

Here 7 is the lookup value

=LOOKUP(7,A1:A10,C1:C10)

--
Jacob (MVP - Excel)


"Yegod" wrote:

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..

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
lookup help. lookup result based on data in 2 columns lcc Excel Worksheet Functions 3 April 6th 10 01:20 PM
Lookup across columns MarkN Excel Worksheet Functions 3 October 18th 06 11:59 PM
Lookup two different columns Sunryzz Excel Worksheet Functions 10 May 31st 06 06:11 PM
Lookup Two Columns macshimi Excel Worksheet Functions 5 January 4th 06 07:44 PM
Lookup a value using two columns liz217 Excel Worksheet Functions 3 November 1st 05 07:58 PM


All times are GMT +1. The time now is 04:24 PM.

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

About Us

"It's about Microsoft Excel"