Approximate Index Match With Multiple Criteria

JetEscamilla

Board Regular
Joined
Apr 17, 2006
Messages
91
Office Version
  1. 2016
Platform
  1. Windows
Hello, I have a need to pull approximate values by using an index/match type array function with multiple variables. I have output with the following column headings

Case Type - Min or Max
M3 - Number (this is what I want for output)
Girder # - Numbers 1 to 13 (These will be output in clusters and in order)
Girder Location (ft) - Number (again, will be in numerical order but with the girders, for example when girder is 2 these rows will start at 0 and work their way up, then girder 3, etc...)

My goal is to use the variables of Case, Girder, and Location to pull the approximate M3 force value closest to the location.

I've tried {Index(D3:D22, Match(Location,(CaseType=A3:A22)*(Girder=B3:B22)*(C3:C22),1)}

With Location = 12, CaseType = Max, Girder = 2 I should return 80 for my force. However this formula is always returning the last row of my index (row 22). I believe this is because the array that is made by my multiplication has zeros at the end. The match case I showed above would give {0,0,0,0,0,0,0,4,8,16,20,0,0,0,0,0,0,0,0}. Does index not work with trailing zeros in the array? My locations may not be exact matches, instead I always want to pull the row that is lower, never above.

Does anyone have a suggestion for another work around?


ABCD
1CaseTypeGirderLocationM3
2TextKip-ftKip-ft
3Max100
4Max1433
5Max1852
6Max11248
7Max11615
8Max1200
9Max200
10Max2440
11Max2880
12Max21674
13Max22035
14Max2240
15Max300
16Max3414
17Max3828
18Max31217
19Max3160
20Min100
21Min14-25
22Min18
0​
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi JetEscamilla,

Does this do what you want?

JetEscamilla.xlsx
ABCDEFGHI
1CaseTypeGirderLocationM3LocationCase TypeGirderResult
2TextKip-ftKip-ft12Max280
3Max100
4Max1433
5Max1852
6Max11248
7Max11615
8Max1200
9Max200
10Max2440
11Max2880
12Max21674
13Max22035
14Max2240
15Max300
16Max3414
17Max3828
18Max31217
19Max3160
20Min100
21Min14-25
22Min180
Sheet1
Cell Formulas
RangeFormula
I2I2=IFERROR(INDEX($D$3:$D$22,AGGREGATE(14,6,ROW($C$3:$C$22)-ROW($C$2)/(($A$3:$A$22=$G$2)*($B$3:$B$22=$H$2)*($C$3:$C$22<=$F$2)),1)),"No match")
 
Upvote 0
Solution
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’)

Given the above,
IF
you have MS365 then you could do it like I have done in G5.
For other versions you could try the G6 formula, confirmed with Ctrl+Shift+Enter, not just Enter.

21 12 02.xlsm
ABCDEFG
1CaseTypeGirderLocationM3
2TextKip-ftKip-ftLocation12
3Max100CaseMax
4Max1433Girder2
5Max1852M380
6Max1124880
7Max11615
8Max1200
9Max200
10Max2440
11Max2880
12Max21674
13Max22035
14Max2240
15Max300
16Max3414
17Max3828
18Max31217
19Max3160
20Min100
21Min14-25
22Min180
Lookup
Cell Formulas
RangeFormula
G5G5=VLOOKUP(G2,FILTER(C3:D22,(A3:A22=G3)*(B3:B22=G4)),2)
G6G6=VLOOKUP(G2,IF(A3:A22=G3,IF(B3:B22=G4,C3:D22)),2)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you both for the help and for the recommendation to update my profile settings. It's been a while since I had to post here (a good thing I guess) and did not know that was an option. Again, appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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