Index Match Multiple Columns - Exact and Approximate

carolj92190

New Member
Joined
Jun 17, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Greetings,
Working on a pricing tool, where the part numbers can have multiple tiers and different number of tiers, based on volume. I've been struggling with trying to index/match the part number in column A (exact) and the volume in column C (approximate based on tier) but either end up with a REF or an incorrect result. In sample data if PN1 is selected and volume quantity is 8000, it would fall into the 2nd tier and the price would be a flat $5375. Sample data only has 3 parts, final tool will have many more so trying to make this as easy as possible. Some attempts at formulas:
=INDEX($A$2:$D$9,MATCH(H2,$A$2:$A$9,0),MATCH(H3,$B$2:$B$9,1)) - resulted in #REF!
=INDEX($D$2:$D$9,MATCH(H2,$A$2:$A$9,0),MATCH(H3,$C$2:$C$9,1)) - resulted in #REF!
=INDEX($D$2:$D$9,MATCH(1,(H2=$A$2:$A$9)*(H3=$C$2:$C$9))) - resulted in $6000 instead of $5375
Appreciate any help you can provide. Thanks!

Part NumberLow VolumeHigh VolumePrice
PN112500$1500
PN1250110000$5375
PN11000125000$12000
PN21100$250
PN2101500$750
PN25011500$1000
PN21501999999$18000
PN31999999$20000
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Let's try this:

MrExcel posts19.xlsx
BCDEFGHI
1
2Lookup Part and Low Boundary
3PN28000$18,000
4
5Part NumberLow VolumePrice
6PN11$1,500
7PN12501$5,375
8PN110001$12,000
9PN21$250
10PN2101$750
11PN2501$1,000
12PN21501$18,000
13PN31$20,000
Sheet35
Cell Formulas
RangeFormula
I3I3=XLOOKUP(H3,FILTER(C6:C13,G3=B6:B13),FILTER(E6:E13,G3=B6:B13),"not found",-1,-1)
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGH
1Part NumberLow VolumeHigh VolumePrice
2PN1125001500PN180005375
3PN12501100005375
4PN1100012500012000
5PN21100250
6PN2101500750
7PN250115001000
8PN2150199999918000
9PN3199999920000
Data
Cell Formulas
RangeFormula
H2H2=TAKE(FILTER(D2:D100,(A2:A100=F2)*(B2:B100<=G2),"No match"),-1)
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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