Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Lookup between list of Mins & Maxs

I have a list of Mins, and a list of Max's. If someone was to enter
in
a number in D3, I would like for it to lookup the entire list of Mins
and Maxs to see if the number entered falls within range of a Min-Max
row.


Example, since 1801 is between 1800 and 2200, it returns the
equivalent word or number in row C.


If I were to put 550 in D3, it would return APPLES.
If I were to put 1499 in D3, it would return CHERRIES.


A B C D E
MIN MAX
500 1000 APPLES
1200 1500 CHERRIES 1801 PLUMS
1800 2200 PLUMS


Note: I have a long list of mins and maxs.


Thanx


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Lookup between list of Mins & Maxs

Give this a try...

=INDEX(C$2:C$100,MATCH(SUMPRODUCT(A$2:A$100*(A$2:A $100<=D3)*(B$2:B$100=D3)),A$2:A$100,1))

Rick


"J.W. Aldridge" wrote in message
...
I have a list of Mins, and a list of Max's. If someone was to enter
in
a number in D3, I would like for it to lookup the entire list of Mins
and Maxs to see if the number entered falls within range of a Min-Max
row.


Example, since 1801 is between 1800 and 2200, it returns the
equivalent word or number in row C.


If I were to put 550 in D3, it would return APPLES.
If I were to put 1499 in D3, it would return CHERRIES.


A B C D E
MIN MAX
500 1000 APPLES
1200 1500 CHERRIES 1801 PLUMS
1800 2200 PLUMS


Note: I have a long list of mins and maxs.


Thanx



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Lookup between list of Mins & Maxs

This is untested, but should work.

Sub minmax()
lstRw = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lstRw
If Range("D3").Value Cells(i, 1).Value _
And Range("D3").Value < Cells(i, 2).Value Then
Range("E3") = Cells(i, 3).Value
End If
Next
End Sub

"J.W. Aldridge" wrote:

I have a list of Mins, and a list of Max's. If someone was to enter
in
a number in D3, I would like for it to lookup the entire list of Mins
and Maxs to see if the number entered falls within range of a Min-Max
row.


Example, since 1801 is between 1800 and 2200, it returns the
equivalent word or number in row C.


If I were to put 550 in D3, it would return APPLES.
If I were to put 1499 in D3, it would return CHERRIES.


A B C D E
MIN MAX
500 1000 APPLES
1200 1500 CHERRIES 1801 PLUMS
1800 2200 PLUMS


Note: I have a long list of mins and maxs.


Thanx



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Lookup between list of Mins & Maxs

Thanx All!

Both worked purfectly!



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
Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup JBush Excel Worksheet Functions 3 January 3rd 07 11:14 PM
how can i convert a value quoted in hrs,mins,secs to just mins The man from delmonte Excel Worksheet Functions 1 October 17th 06 11:12 AM
Grabbing Mins/Maxs Off a Chart Chris Charts and Charting in Excel 1 February 10th 06 08:53 PM
Adding minutes showing total in hours/minutes, i.e., 60 mins + 60 mins + 15 mins to total of 2 hours 15 mins? StargateFan Excel Discussion (Misc queries) 8 January 7th 06 07:35 PM
How to convert numeric value to mins and addimg mins to Hrs. ramana Excel Worksheet Functions 1 October 28th 05 10:42 AM


All times are GMT +1. The time now is 06:56 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"