INDEX-MATCH-MATCH help!

JohnMense

New Member
Joined
Jan 26, 2015
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi everyone

Having major issue in getting INDEX-MATCH-MATCH to locate specific data and return it to another sheet.

Data tab:
1. 2 teams, with the names running across merged cells above the 3 columns for the data fields
2. B = 5 Functions 3x each, C = 3 Practices per Function
3. 3 value fields under each team for Baseline, Target, Current values. These numbers all get derived without issue.

Index-Match tab:
Trying to pull into a table all the values above with INDEX-MATCH for then using in a pivot table.

With MATCH I am able to locate the team and practice and function individually but when I try and INDEX with variations of the matches I am not getting the right info. In the Baseline (1st data column) I am ok but then cannot get the target or current values right.

I have tried to first locate the Team, then the value header (Baseline, etc),and then Practice but is not working out.

Not looking to use macros or anything, just with INDEX & MATCH functions.

Any help greatly appreciated!

Note: this is a simple extract, actual file has many teams with more added weekly....

Here are images of the 2 tabs. Not sure how to publish the actual Excel sheets (if possible at all).

DATA.jpg


INDEX-MATCH Tab.jpg
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Otherwise I have this?

INDEX-MATCH.xlsx
BCDEFGHIJKLMNOP
3FunctionPracticeTeam ATeam B
4BaselineTargetCurrentBaselineTargetCurrent
5Function 1Strategy0.53.02.03.03.03.0TeamFunctionPracticeBaselineTargetCurrent
6Function 1Compliance2.61.53.01.82.01.8Team AFunction 1Strategy
7Function 1Education1.52.01.51.42.51.4Team AFunction 1Compliance
8Function 2Threats0.01.00.00.12.30.1Team AFunction 1Education
9Function 2Security1.02.01.02.02.02.0Team AFunction 2Threats
10Function 2Architecture0.52.00.51.81.81.8Team AFunction 2Security
11Function 3Build1.02.51.92.43.02.4Team AFunction 2Architecture
12Function 3Deploy1.52.51.91.52.51.5Team AFunction 3Build
13Function 3Manage3.03.03.01.31.81.3Team AFunction 3Deploy
14Function 4Assessment0.02.00.01.62.01.6Team AFunction 3Manage
15Function 4Testing0.91.50.92.82.52.8Team AFunction 4Assessment
16Function 4Validation0.52.00.51.63.01.6Team AFunction 4Testing
17Function 5Incidents0.12.52.81.32.51.3Team AFunction 4Validation
18Function 5Environment0.02.51.02.33.02.3Team AFunction 5Incidents
19Function 5Operations0.62.50.61.63.01.6Team AFunction 5Environment
20Team AFunction 5Operations
21Team BFunction 1Strategy
22Team BFunction 1Compliance
23Team BFunction 1Education
24Team BFunction 2Threats
25Team BFunction 2Security
26Team BFunction 2Architecture
27Team BFunction 3Build
28Team BFunction 3Deploy
29Team BFunction 3Manage
30Team BFunction 4Assessment
31Team BFunction 4Testing
32Team BFunction 4Validation
33Team BFunction 5Incidents
34Team BFunction 5Environment
35Team BFunction 5Operations
Data
 
Upvote 0
I believe the merged 'Team' cell is the root of the issue. A match for Team A will always return result '4' so when I try to then match location for the value header (ex: baseline) it causes a problem.
 
Upvote 0
Although we prefer to avoid Merged Cells and would have used Center Across Selection, it is the fact that Team only appears in the first column of the "3 column set" that is causing you grief.
Assuming both source and destination have the same 3 columns in the same order you can try these in Cell N6.
1) If not a table and you can spill across the row:
Just copy down to all rows:
Excel Formula:
=INDEX($D$5:$I$19,
       MATCH(1,($B$5:$B$19=$L6)*($C$5:$C$19=$M6),0),
       MATCH($K6,$D$3:$I$3,0)+{0,1,2})

2) If it is a table or you just don't want to spill:
Copy across and down
Excel Formula:
=INDEX($D$5:$I$19,
       MATCH(1,($B$5:$B$19=$L6)*($C$5:$C$19=$M6),0),
       MATCH($K6,$D$3:$I$3,0)-1+COLUMNS($N$5:N$5))

Basically once you find the Team you want to advance 0, 1, or 2 columns from that position.
 
Upvote 0
Gives me errors unfortunately and no clue why.

(MATCH($K6,$D$3:$I$3,0)-1+COLUMNS($N$5:N$5)): I see that it returns the column number desired for the 3 value fields, thanks for that!

Have tried to then MATCH to the Function value location and return the value but no luck at all.

Any other ideas?
 
Upvote 0
Please provide an XL2BB of the sheet that has the formula in place. Unless you don't actually have MS365 the below should show you that it works.

20241128 IndexMatch Offset from hdg JohnMense.xlsx
ABCDEFGHIJKLMNOP
1
2
3FunctionPracticeTeam ATeam B
4BaselineTargetCurrentBaselineTargetCurrent
5Function 1Strategy0.532333TeamFunctionPracticeBaselineTargetCurrent
6Function 1Compliance2.6251.531.7521.75Team AFunction 1Strategy0.532
7Function 1Education1.521.51.3752.51.375Team AFunction 1Compliance2.6251.53
8Function 2Threats0100.1252.250.125Team AFunction 1Education1.521.5
9Function 2Security121222Team AFunction 2Threats010
10Function 2Architecture0.520.51.751.751.75Team AFunction 2Security121
11Function 3Build12.51.8752.37532.375Team AFunction 2Architecture0.520.5
12Function 3Deploy1.52.51.8751.52.51.5Team AFunction 3Build12.51.875
13Function 3Manage3331.251.751.25Team AFunction 3Deploy1.52.51.875
14Function 4Assessment0201.62521.625Team AFunction 3Manage333
15Function 4Testing0.8751.50.8752.752.52.75Team AFunction 4Assessment020
16Function 4Validation0.520.51.62531.625Team AFunction 4Testing0.8751.50.875
17Function 5Incidents0.1252.52.751.252.51.25Team AFunction 4Validation0.520.5
18Function 5Environment02.512.2532.25Team AFunction 5Incidents0.1252.52.75
19Function 5Operations0.6252.50.6251.62531.625Team AFunction 5Environment02.51
20Team AFunction 5Operations0.6252.50.625
21Team BFunction 1Strategy333
22Team BFunction 1Compliance1.7521.75
23Team BFunction 1Education1.3752.51.375
24Team BFunction 2Threats0.1252.250.125
25Team BFunction 2Security222
26Team BFunction 2Architecture1.751.751.75
27Team BFunction 3Build2.37532.375
28Team BFunction 3Deploy1.52.51.5
29Team BFunction 3Manage1.251.751.25
30Team BFunction 4Assessment1.62521.625
31Team BFunction 4Testing2.752.52.75
32Team BFunction 4Validation1.62531.625
33Team BFunction 5Incidents1.252.51.25
34Team BFunction 5Environment2.2532.25
35Team BFunction 5Operations1.62531.625
Data
Cell Formulas
RangeFormula
N6:P35N6=INDEX($D$5:$I$19, MATCH(1,($B$5:$B$19=$L6)*($C$5:$C$19=$M6),0), MATCH($K6,$D$3:$I$3,0)-1+COLUMNS($N$5:N$5))
 
Upvote 0
Solution
INDEX-MATCH.xlsx
BCDEFGHIJKLMNOP
3FunctionPracticeTeam ATeam B
4BaselineTargetCurrentBaselineTargetCurrent
5Function 1Strategy0.53.02.03.03.03.0TeamFunctionPracticeBaselineTargetCurrent
6Function 1Compliance2.61.53.01.82.01.8Team AFunction 1Strategy#N/A#N/A#N/A
7Function 1Education1.52.01.51.42.51.4Team AFunction 1Compliance#N/A#N/A#N/A
8Function 2Threats0.01.00.00.12.30.1Team AFunction 1Education#N/A#N/A#N/A
9Function 2Security1.02.01.02.02.02.0Team AFunction 2Threats#N/A#N/A#N/A
10Function 2Architecture0.52.00.51.81.81.8Team AFunction 2Security#N/A#N/A#N/A
11Function 3Build1.02.51.92.43.02.4Team AFunction 2Architecture#N/A#N/A#N/A
12Function 3Deploy1.52.51.91.52.51.5Team AFunction 3Build#N/A#N/A#N/A
13Function 3Manage3.03.03.01.31.81.3Team AFunction 3Deploy#N/A#N/A#N/A
14Function 4Assessment0.02.00.01.62.01.6Team AFunction 3Manage#N/A#N/A#N/A
15Function 4Testing0.91.50.92.82.52.8Team AFunction 4Assessment#N/A#N/A#N/A
16Function 4Validation0.52.00.51.63.01.6Team AFunction 4Testing#N/A#N/A#N/A
17Function 5Incidents0.12.52.81.32.51.3Team AFunction 4Validation#N/A#N/A#N/A
18Function 5Environment0.02.51.02.33.02.3Team AFunction 5Incidents#N/A#N/A#N/A
19Function 5Operations0.62.50.61.63.01.6Team AFunction 5Environment#N/A#N/A#N/A
20Team AFunction 5Operations#VALUE!#VALUE!#VALUE!
21Team BFunction 1Strategy#VALUE!#VALUE!#VALUE!
22Team BFunction 1Compliance#VALUE!#VALUE!#VALUE!
23Team BFunction 1Education#VALUE!#VALUE!#VALUE!
24Team BFunction 2Threats#VALUE!#VALUE!#VALUE!
25Team BFunction 2Security#VALUE!#VALUE!#VALUE!
26Team BFunction 2Architecture#VALUE!#VALUE!#VALUE!
27Team BFunction 3Build#VALUE!#VALUE!#VALUE!
28Team BFunction 3Deploy#VALUE!#VALUE!#VALUE!
29Team BFunction 3Manage#VALUE!#VALUE!#VALUE!
30Team BFunction 4Assessment#VALUE!#VALUE!#VALUE!
31Team BFunction 4Testing#VALUE!#VALUE!#VALUE!
32Team BFunction 4Validation#VALUE!#VALUE!#VALUE!
33Team BFunction 5Incidents#VALUE!#VALUE!#VALUE!
34Team BFunction 5Environment#VALUE!#VALUE!#VALUE!
35Team BFunction 5Operations#VALUE!#VALUE!#VALUE!
36
Data
Cell Formulas
RangeFormula
N6:P35N6=INDEX($D$5:$I$19,MATCH(1,($B$5:$B$19=$L6)*($C$5:$C$19=$M6),0),MATCH($K6,$D$3:$I$3,0)-1+COLUMNS($N$5:N$5))
 
Upvote 0

Forum statistics

Threads
1,224,142
Messages
6,176,622
Members
452,738
Latest member
kylua

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