excel formula lookup

ariel20029

Board Regular
Joined
Jun 20, 2013
Messages
97
I need to pull a product ID based on if the number of users and a specific product are in a range of values. I tried a few formulas with no luck.
IDUsersPROD IDIDUSER LOWUSER HIGHPROD ID
A1 A1100 AB1
A100 A101200 AB2
B150 A201300 AB3
B10 B1 100 BA1
C300 B101200 BA2
B201300 BA3
C1100 CA1
C101200CA2
C201300CA3

<COLGROUP><COL style="WIDTH: 48pt" span=9 width=64><TBODY>
</TBODY>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
What are your expected results in the yellow cells? Not clear how the formula should interpret the low and high ranges.
 
Upvote 0
What are your expected results in the yellow cells? Not clear how the formula should interpret the low and high ranges.

I am looking for the product ID to return. Thats the issue I am having finding a formula to work on the range. I did it a very long time ago but cant remember how I did it.
 
Upvote 0
Gottit!

Lookup table is A1:D9

Yellow user table is A11:B14

=INDEX(A$1:D$9,MATCH(A11,IF(B11>=B$1:B$9,IF(B11<=C$1:C$9,A$1:A$9,"")),0),4)
Array formula, use Ctrl-Shift-Enter

Note: You MUST use two IFs one behind the other as above, I was trying to use AND(B11>=B$1:B$9,B11<=C$1:C$9) and it was failing. I recollect someone explaining to me on a forum why you couldnt use the AND but I cant recall why, anyway the above works if you set the location of the tables as specified.
 
Upvote 0
Gottit!

Lookup table is A1:D9

Yellow user table is A11:B14

=INDEX(A$1:D$9,MATCH(A11,IF(B11>=B$1:B$9,IF(B11<=C$1:C$9,A$1:A$9,"")),0),4)
Array formula, use Ctrl-Shift-Enter

Note: You MUST use two IFs one behind the other as above, I was trying to use AND(B11>=B$1:B$9,B11<=C$1:C$9) and it was failing. I recollect someone explaining to me on a forum why you couldnt use the AND but I cant recall why, anyway the above works if you set the location of the tables as specified.

thank you so much,
I will give it a shot.
Sharon
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top