Index match with multiple criteria, sheets & columns

Tbaileyco

New Member
Joined
Oct 3, 2013
Messages
5
Office Version
  1. 365
Hello All,

I am trying to get a Index Match formula to work on my sheet Currently I am trying to use the following but its not working. =INDEX(NewDemand!$A$1:$CA$55,MATCH($C$1,NewDemand!$A$1:$A$55,0),MATCH($E18,NewDemand!$A$1:$CA$1,0),MATCH($O$1,NewDemand!$Q$1:$Q$55,0))

First Sheet:

Demand Plan1.xlsx
ABCDEFGHIJKLMNO
11111TotReq
2PIRCon
3CusReq
4CusAck
5SPLY
6PAB
7
8AVG Weekly Usage:NOTES:
9
10
11
12
13
14
15
16StartEndPeriod C.Y.On-HandDemandSupplyNote
1711/11/2311/17/23Prior582100-
1811/18/2311/24/232023/47482#REF!-G18 - should pull in 560
1911/25/2312/01/232023/48#REF!#REF!-
2012/02/2312/08/232023/49#REF!#REF!-
2112/09/2312/15/232023/50#REF!#REF!-G21 - should pull in 280
2212/16/2312/22/232023/51#REF!#REF!-
2312/23/2312/29/232023/52#REF!#REF!-
2412/30/2301/05/242024/1#REF!#REF!500
2501/06/2401/12/242024/2#REF!#REF!-
2601/13/2401/19/242024/3#REF!#REF!-
2701/20/2401/26/242024/4#REF!#REF!-
2801/27/2402/02/242024/5#REF!#REF!-
2902/03/2402/09/242024/6#REF!#REF!-
3002/10/2402/16/242024/7#REF!#REF!-
3102/17/2402/23/242024/8#REF!#REF!-
3202/24/2403/01/242024/9#REF!#REF!5,000
3303/02/2403/08/242024/10#REF!#REF!-
3403/09/2403/15/242024/11#REF!#REF!-
3503/16/2403/22/242024/12#REF!#REF!-
3603/23/2403/29/242024/13#REF!#REF!-
3703/30/2404/05/242024/14#REF!#REF!-
3804/06/2404/12/242024/15#REF!#REF!-
3904/13/2404/19/242024/16#REF!#REF!-
4004/20/2404/26/242024/17#REF!#REF!500
4104/27/2405/03/242024/18#REF!#REF!-
4205/04/2405/10/242024/19#REF!#REF!-
4305/11/2405/17/242024/20#REF!#REF!-
4405/18/2405/24/242024/21#REF!#REF!-
4505/25/2405/31/242024/22#REF!#REF!-
4606/01/2406/07/242024/23#REF!#REF!-
4706/08/2406/14/242024/24#REF!#REF!-
4806/15/2406/21/242024/25#REF!#REF!5,000
4906/22/2406/28/242024/26#REF!#REF!-
5006/29/2407/05/242024/27#REF!#REF!-
5107/06/2407/12/242024/28#REF!#REF!-
5207/13/2407/19/242024/29#REF!#REF!-
5307/20/2407/26/242024/30#REF!#REF!-
5407/27/2408/02/242024/31#REF!#REF!-
5508/03/2408/09/242024/32#REF!#REF!-
5608/10/2408/16/242024/33#REF!#REF!500
5708/17/2408/23/242024/34#REF!#REF!-
5808/24/2408/30/242024/35#REF!#REF!-
5908/31/2409/06/242024/36#REF!#REF!-
6009/07/2409/13/242024/37#REF!#REF!-
6109/14/2409/20/242024/38#REF!#REF!-
6209/21/2409/27/242024/39#REF!#REF!-
6309/28/2410/04/242024/40#REF!#REF!-
6410/05/2410/11/242024/41#REF!#REF!900
6510/12/2410/18/242024/42#REF!#REF!-
6610/19/2410/25/242024/43#REF!#REF!-
6710/26/2411/01/242024/44#REF!#REF!-
6811/02/2411/08/242024/45#REF!#REF!-
6911/09/2411/15/242024/46#REF!#REF!-
7011/16/2411/22/242024/47#REF!#REF!-
7111/23/2411/29/242024/48#REF!#N/A-
7211/30/2412/06/242024/49#REF!#N/A2,000
7312/07/2412/13/242024/50#REF!#N/A-
7412/14/2412/20/242024/51#REF!#N/A-
7512/21/2412/27/242024/52#REF!#N/A-
DemandPlan
Cell Formulas
RangeFormula
F18:F75F18=F17-G17+H17
G18:G75G18=INDEX(NewDemand!$A$1:$CA$55,MATCH($C$1,NewDemand!$A$1:$A$55,0),MATCH($E18,NewDemand!$A$1:$CA$1,0),MATCH($O$1,NewDemand!$Q$1:$Q$55,0))
Named Ranges
NameRefers ToCells
NewDemand!_FilterDatabase=NewDemand!$A$1:$CA$55G18:G75
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F17:F75Cell Value<0textNO
F17:F75Cell Value>1textNO



Second Sheet:

Demand Plan1.xlsx
AQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBW
1MaterialElementPrior2023/472023/482023/492023/502023/512023/522024/12024/22024/32024/42024/52024/62024/72024/82024/92024/102024/112024/122024/132024/142024/152024/162024/172024/182024/192024/202024/212024/222024/232024/242024/252024/262024/272024/282024/292024/302024/312024/322024/332024/342024/352024/362024/372024/382024/392024/402024/412024/422024/432024/442024/452024/462024/472024/002024/012024/02Total
21111TotReq58256000##00000##0##0##0##000000##0##000##000##0000##0##0##000##00##00000##0##
31111PIRCon0000000000000000000000000000000000000000000000000000000000
41111CusReq0000000000000000000000000000000000000000000000000000000000
51111CusAck0000000000000000000000000000000000000000000000000000000000
61111SPLY0000000000000000000000####0000000000000000000##000##000000000##
71111PAB1354794794############################################################################################################0
82222TotReq118695200##0##0##0####00##########################################################################################
92222PIRCon0000000000000000000000000000000000000000000000000000000000
102222CusReq0000000000000000000000000000000000000000000000000000000000
112222CusAck0000000000000000000000000000000000000000000000000000000000
122222SPLY39800####00000############0##0##00##0##00##00##00##00####000######00##########000##00##
132222PAB-26526-36046-36046############################################################################################################0
143333TotReq0022400000##00####0##0######################################################################################
153333PIRCon0000000000000000000000000000000000000000000000000000000000
NewDemand
Cell Formulas
RangeFormula
S7S7=R7-S2
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
There are three match arguments in your formula, which seems to be the problem. When I used your formula but removed the third match, it worked for me. If TotReq is always the first occurrence of your material number, that's the row it will return, so I don't think you need it.

Book1
ABCDEFGHIJK
11111
2
3
4
5
6
7
8AVG Weekly Usage:NOTES:
9
10
11
12
13
14
15
16StartEndPeriod C.Y.On-HandDemandSupplyNote
174524145247Prior5821000
1845248452542023/474825600G18 - should pull in 560
1945255452612023/48-7800
2045262452682023/49-7800
2145269452752023/50-782800G21 - should pull in 280
2245276452822023/51-35800
2345283452892023/52-35800
2445290452962024/1-3580500
2545297453032024/214200
2645304453102024/314200
2745311453172024/41425600
2845318453242024/5-41800
2945325453312024/6-4182800
3045332453382024/7-69800
3145339453452024/8-6982800
3245346453522024/9-97805000
3345353453592024/1040222800
3445360453662024/11374200
3545367453732024/12374200
3645374453802024/13374200
3745381453872024/14374200
3845388453942024/15374200
3945395454012024/16374200
4045402454082024/173742280500
4145409454152024/18396200
4245416454222024/1939625600
4345423454292024/20340200
4445430454362024/21340200
4545437454432024/22340200
4645444454502024/2334025600
4745451454572024/24284200
4845458454642024/25284205000
4945465454712024/26784200
5045472454782024/2778422800
5145479454852024/28756200
5245486454922024/29756200
5345493454992024/30756200
5445500455062024/31756200
5545507455132024/3275622800
5645514455202024/3372820500
5745521455272024/3477822800
5845528455342024/35750200
5945535455412024/3675022800
6045542455482024/37722200
6145549455552024/38722200
6245556455622024/39722200
6345563455692024/4072225600
6445570455762024/4166620900
6545577455832024/42756200
6645584455902024/4375622800
6745591455972024/44728200
6845598456042024/45728200
6945605456112024/46728200
7045612456182024/47728200
7145619456252024/487282#N/A0These don't appear in the table
7245626456322024/49#N/A#N/A2000
7345633456392024/50#N/A#N/A0
7445640456462024/51#N/A#N/A0
7545647456532024/52#N/A#N/A0
DemandPlan
Cell Formulas
RangeFormula
F18:F75F18=F17-G17+H17
G18:G75G18=INDEX(NewDemand!$A$1:$CA$55,MATCH($C$1,NewDemand!$A$1:$A$55,0),MATCH($E18,NewDemand!$A$1:$CA$1,0))
 
Upvote 0
Thank you for your Quick Reply Jen!

I am hoping to use the same formula to pull in the Supply ("SPLY") from the same data set, That is the reason for tying to get the last match in the formula that doesn't seem to be working as I want!
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I'm working with your data using instructions based on INDEX MATCH with Multiple Criteria (With Examples), specifically the section called "INDEX MATCH with Multiple Criteria Excel Formula" and got the below. See if this works for you.

2023-11-28.xlsx
ABCDEFGHIJKLMNO
11111TotReq
2PIRCon
3CusReq
4CusAck
5SPLY
6PAB
7
8AVG Weekly Usage:NOTES:
9
10
11
12
13
14
15
16StartEndPeriod C.Y.On-HandDemandSupplyNote
174524145247Prior5821000
1845248452542023/474825600G18 - should pull in 560
1945255452612023/48-7800
2045262452682023/49-7800
2145269452752023/50-782800G21 - should pull in 280
2245276452822023/51-35800
2345283452892023/52-35800
2445290452962024/1-35800
2545297453032024/2-35800
2645304453102024/3-35800
2745311453172024/4-3585600
2845318453242024/5-91800
2945325453312024/6-9182800
3045332453382024/7-119800
3145339453452024/8-11982800
3245346453522024/9-147800
3345353453592024/10-14782800
3445360453662024/11-175800
3545367453732024/12-175800
3645374453802024/13-175800
3745381453872024/14-175800
3845388453942024/15-175800
3945395454012024/16-175800
4045402454082024/17-17582800
4145409454152024/18-203800
4245416454222024/19-20385600
4345423454292024/20-259800
4445430454362024/21-259800
4545437454432024/22-259800
4645444454502024/23-25985600
4745451454572024/24-315800
4845458454642024/25-315800
4945465454712024/26-315800
5045472454782024/27-31582800
5145479454852024/28-343800
5245486454922024/29-343800
5345493454992024/30-343800
5445500455062024/31-343800
5545507455132024/32-34382800
5645514455202024/33-371800
5745521455272024/34-37182800
5845528455342024/35-399800
5945535455412024/36-39982800
6045542455482024/37-427800
6145549455552024/38-427800
6245556455622024/39-427800
6345563455692024/40-42785600
6445570455762024/41-483800
6545577455832024/42-483800
6645584455902024/43-48382800
6745591455972024/44-511800
6845598456042024/45-511800
6945605456112024/46-511800
7045612456182024/47-511800
7145619456252024/48-5118#N/A#N/AThese don't appear in the table
7245626456322024/49#N/A#N/A#N/A
7345633456392024/50#N/A#N/A#N/A
7445640456462024/51#N/A#N/A#N/A
7545647456532024/52#N/A#N/A#N/A
DemandPlan
Cell Formulas
RangeFormula
F18:F75F18=F17-G17+H17
G18:G75G18=INDEX(NewDemand!$A$1:$CA$55,MATCH($C$1&$O$1,NewDemand!$A$1:$A$55&NewDemand!$Q$1:$Q$55,0),MATCH($E18,NewDemand!$A$1:$CA$1,0))
H18:H75H18=INDEX(NewDemand!$A$1:$CA$55,MATCH($C$1&$O$5,NewDemand!$A$1:$A$55&NewDemand!$Q$2:$Q$55,0),MATCH($E18,NewDemand!$A$1:$CA$1,0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 1
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I have updated it to 365! Thank you for the suggestion.
 
Upvote 0
I have updated it to 365!
Thanks for that. (y)
How about
Fluff.xlsm
ABCDEFGHIJKLMNO
11111TotReq
2PIRCon
3CusReq
4CusAck
5SPLY
6PAB
7
8AVG Weekly Usage:NOTES:
9
10
11
12
13
14
15
16StartEndPeriod C.Y.On-HandDemandSupplyNote
174524145247Prior5821000
1845248452542023/474825600G18 - should pull in 560
1945255452612023/48-7800
2045262452682023/49-7800
2145269452752023/50-782800G21 - should pull in 280
2245276452822023/51-35800
2345283452892023/52-35800
2445290452962024/1-3580500
2545297453032024/214200
2645304453102024/314200
2745311453172024/41425600
2845318453242024/5-41800
2945325453312024/6-4182800
3045332453382024/7-69800
3145339453452024/8-6982800
3245346453522024/9-97805000
3345353453592024/1040222800
3445360453662024/11374200
3545367453732024/12374200
3645374453802024/13374200
3745381453872024/14374200
3845388453942024/15374200
3945395454012024/16374200
4045402454082024/173742280500
4145409454152024/18396200
4245416454222024/1939625600
4345423454292024/20340200
4445430454362024/21340200
4545437454432024/22340200
4645444454502024/2334025600
4745451454572024/24284200
4845458454642024/25284205000
4945465454712024/26784200
5045472454782024/2778422800
5145479454852024/28756200
5245486454922024/29756200
5345493454992024/30756200
5445500455062024/31756200
5545507455132024/3275622800
5645514455202024/3372820500
5745521455272024/3477822800
5845528455342024/35750200
5945535455412024/3675022800
6045542455482024/37722200
6145549455552024/38722200
6245556455622024/39722200
6345563455692024/4072225600
6445570455762024/4166620900
6545577455832024/42756200
6645584455902024/4375622800
6745591455972024/44728200
6845598456042024/45728200
6945605456112024/46728200
7045612456182024/47728200
7145619456252024/487282#N/A0
7245626456322024/49#N/A#N/A2000
7345633456392024/50#N/A#N/A0
7445640456462024/51#N/A#N/A0
7545647456532024/52#N/A#N/A0
Sheet2
Cell Formulas
RangeFormula
F18:F75F18=F17-G17+H17
G18:G75G18=INDEX(FILTER(NewDemand!$A$1:$CA$55,($C$1=NewDemand!$A$1:$A$55)*($O$1=NewDemand!$Q$1:$Q$55)),XMATCH($E18,NewDemand!$A$1:$CA$1))
 
Upvote 1

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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