Dynamic Sumifs Formula: Multiple Row Criteria, Dynamic Column

Bkisley

Board Regular
Joined
Jan 5, 2017
Messages
100
I have a data table say A1:N100
Column A is Category
Column B is Sub Category
Columns C:N would be Jan - Dec

I need a dynamic sum that only sums up if Category A value is "Criteria1", Category B value is "Criteria2" and for only the month of my choosing. Sometimes this will be current month, sometimes will be prior month.
If it helps, let's put the month I need over in O1

Clearly this is a normal sumifs at first but cant figure out the column aspect.

=Sumifs(Dynamic Column Reference,A:A,"Criteria1",B:B,"Criteria2"

Hope this makes sense!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
It gets a bit messy if you put the month criteria right next to the table (assuming it's an actual Excel table & not just a range) because whenever you change the value the table is resized to incorporate column O into itself. If it's just a range, then the following is one option:
Book1
ABCDEFGHIJKLMNO
1HDR1HDR2JanFebMarAprMayJunJulAugSepOctNovDecFeb
2Criteria1Criteria2410558526110210
3Criteria1Criteria2345778722237
4Criteria1Criteria271411010784591
5Criteria1CriteriaX3925510115238
6Criteria1CriteriaX581108106101794
7Criteria1CriteriaX326151017104109
8CriteriaXCriteriaX9185109725425
9CriteriaXCriteriaX6410795481771
10CriteriaXCriteriaX714629925798
11CriteriaXCriteriaX32764462210110
12
1315= Sum of O1 month
14Criteria1 & Criteria2
Sheet1
Cell Formulas
RangeFormula
B13B13=SUMPRODUCT(($A$2:$A$11="Criteria1")*($B$2:$B$11="Criteria2")*($C$1:$N$1=O1),$C$2:$N$11)
Cells with Data Validation
CellAllowCriteria
O1List=$C$1:$N$1
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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