Sum Multiple Columns Index Match Matrix

aboydprice

New Member
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))

 B C D E F G H I J K L M 2 OC_840 OC_100 OC_861 OC_TECH OC_TECH OC_840 OC_100 OC_861 OC_TECH 3 Cash 1 4 7 10 13 Cash 1 4 7 10 4 RR 2 5 8 11 14 RR 2 5 8 11 5 TA 3 6 9 12 15 TA 3 6 9 12

<colgroup><col width="64" span="13" style="width:48pt"> </colgroup><tbody>
</tbody>

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

DRSteele

Well-known Member
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:

Replies
1
Views
145
Replies
4
Views
94
Replies
5
Views
106
Replies
1
Views
128
Replies
3
Views
119

1,128,131
Messages
5,628,885
Members
416,349
Latest member
salmanb74

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.

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

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