Sumif entire table with multiple row and column criteria

alimat

New Member
Joined
Aug 27, 2015
Messages
2
Hi! I'm attempting to sum all values in a table that that 1. match a specific value in a header (column) and 2. match multiple values in the rows (there are about 20 values). Each of the values I want the data to match are referencing cells that contain the value.

The below formula I pasted below works, it's just cumbersome. I think there may be a way to do this with SUMPRODUCT, but I haven't been able to figure it out. Can anyone help?

Also, if there is a better formula for summing things from a 2 dimensional table, with 2 dimensional criteria, I'd welcome the advice! :)

*the formula below is an array**


=(SUMIF(Table6[[#All],[Row Labels]],$A$169,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$170,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$171,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A172,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$173,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A174,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$175,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$176,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$177,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$178,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$179,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0)))+SUMIF(Table6[[#All],[Row Labels]],$A$180,INDEX(Table6[#All],0,MATCH(K$167,Table6[#Headers],0))))
 

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
Try using SUMIFS

=sumifs(Column to SUM Range, Criteria Range 1, Criteria 1, Criteria Range 2, Ciriteria 2, etc)
 
Upvote 0
This works if you are defining the column to sum. I need to define a range for excel to find the one column and then add from it.
 
Upvote 0
Please provide a sample of your workbook as it will be easier to understand the formula and suggest an alternative.
 
Upvote 0

Forum statistics

Threads
1,223,101
Messages
6,170,116
Members
452,302
Latest member
TaMere

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