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


BCDEFGHIJKLM
2OC_840OC_100OC_861OC_TECHOC_TECHOC_840OC_100OC_861OC_TECH
3Cash1471013Cash14710
4RR2581114RR25811
5TA3691215TA36912

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

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,384
Office Version
  1. 365
Platform
  1. Windows
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:

Watch MrExcel Video

Forum statistics

Threads
1,130,218
Messages
5,640,953
Members
417,182
Latest member
mgcorreia

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
Top