Sum Multiple Columns Index Match Matrix

aboydprice

New Member
Joined
Nov 6, 2019
Messages
1
How can I write a formula that will sum the value from multiple columns using an index match matrix based approach?

The formula below will work when there is only one column that has the "OC_TECH" value, but I want to sum both values if "OC_TECH" occurs as a column header more than once.

for example the value in cell M4 should be 23, and M4 should be 25

=INDEX($C$4:$G$6,MATCH($I4,$B$4:$B$6,0),MATCH(M$3,$C$3:$G$3,0))


[TABLE="width: 832"]
<colgroup><col width="64" span="13" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"][/TD]
[TD="class: xl67, width: 64"]B[/TD]
[TD="class: xl67, width: 64"]C[/TD]
[TD="class: xl67, width: 64"]D[/TD]
[TD="class: xl67, width: 64"]E[/TD]
[TD="class: xl67, width: 64"]F[/TD]
[TD="class: xl67, width: 64"]G[/TD]
[TD="class: xl67, width: 64"]H[/TD]
[TD="class: xl67, width: 64"]I[/TD]
[TD="class: xl67, width: 64"]J[/TD]
[TD="class: xl67, width: 64"]K[/TD]
[TD="class: xl67, width: 64"]L[/TD]
[TD="class: xl67, width: 64"]M[/TD]
[/TR]
[TR]
[TD="class: xl67"]2[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl65"]OC_840[/TD]
[TD="class: xl65"]OC_100[/TD]
[TD="class: xl65"]OC_861[/TD]
[TD="class: xl65"]OC_TECH[/TD]
[TD="class: xl65"]OC_TECH[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl65"]OC_840[/TD]
[TD="class: xl65"]OC_100[/TD]
[TD="class: xl65"]OC_861[/TD]
[TD="class: xl65"]OC_TECH[/TD]
[/TR]
[TR]
[TD="class: xl67"]3[/TD]
[TD="class: xl66"]Cash[/TD]
[TD="class: xl66, align: right"]1[/TD]
[TD="class: xl66, align: right"]4[/TD]
[TD="class: xl66, align: right"]7[/TD]
[TD="class: xl66, align: right"]10[/TD]
[TD="class: xl66, align: right"]13[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]Cash[/TD]
[TD="class: xl66, align: right"]1[/TD]
[TD="class: xl66, align: right"]4[/TD]
[TD="class: xl66, align: right"]7[/TD]
[TD="class: xl66, align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl67"]4[/TD]
[TD="class: xl66"]RR[/TD]
[TD="class: xl66, align: right"]2[/TD]
[TD="class: xl66, align: right"]5[/TD]
[TD="class: xl66, align: right"]8[/TD]
[TD="class: xl66, align: right"]11[/TD]
[TD="class: xl66, align: right"]14[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]RR[/TD]
[TD="class: xl66, align: right"]2[/TD]
[TD="class: xl66, align: right"]5[/TD]
[TD="class: xl66, align: right"]8[/TD]
[TD="class: xl66, align: right"]11[/TD]
[/TR]
[TR]
[TD="class: xl67"]5[/TD]
[TD="class: xl66"]TA[/TD]
[TD="class: xl66, align: right"]3[/TD]
[TD="class: xl66, align: right"]6[/TD]
[TD="class: xl66, align: right"]9[/TD]
[TD="class: xl66, align: right"]12[/TD]
[TD="class: xl66, align: right"]15[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"]TA[/TD]
[TD="class: xl66, align: right"]3[/TD]
[TD="class: xl66, align: right"]6[/TD]
[TD="class: xl66, align: right"]9[/TD]
[TD="class: xl66, align: right"]12[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to the forum.

You might be better off just multiplying arrays and summing them. So put this formula in J3 and copy across then down.

Code:
[FONT=Verdana]=SUMPRODUCT((J$2=$C$2:$G$2)*($I3=$B$3:$B$5)*$C$3:$G$5)[/FONT]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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