Adding Multiple Columns and Multiple Rows - Using specific criteria

gamingguy

New Member
Joined
Jun 21, 2019
Messages
2
Hi Guys

Just curious if someone knew had to do a complicated "sumif" calculation where you take the criteria in a list from the columns and the rows. What I am trying to do is add up all the quarters in a specific year (say in this case 2018) and add only 2018's quarters along with the information for Variable 2. I would like to repeat this for years etc so eventually I get a small table that has the summation of years, and one row for each variable.

IS that possible in excel?





[TABLE="class: grid, width: 2000"]
<tbody>[TR]
[TABLE="width: 1130"]
<colgroup><col><col><col><col span="6"><col span="4"></colgroup><tbody>[TR]
[TD] [/TD]
[TD="align: center"]2017
[/TD]
[TD="align: center"]2017[/TD]
[TD="align: center"]2017[/TD]
[TD="align: center"]2017[/TD]
[TD="align: center"]2018[/TD]
[TD="align: center"]2018[/TD]
[TD="align: center"]2018[/TD]
[TD="align: center"]2018[/TD]
[TD="align: center"]2019[/TD]
[TD="align: center"]2019
[/TD]
[TD="align: center"]2019[/TD]
[TD="align: center"]2019
[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD="align: center"]2017.Q1[/TD]
[TD="align: center"]2017.Q2
[/TD]
[TD="align: center"]2017.Q3[/TD]
[TD="align: center"]2017.Q4[/TD]
[TD="align: center"]2018.Q1[/TD]
[TD="align: center"]2018.Q2[/TD]
[TD="align: center"]2018.Q3[/TD]
[TD="align: center"]2018.Q4[/TD]
[TD="align: center"]2019.Q1[/TD]
[TD="align: center"]2019.Q2[/TD]
[TD="align: center"]2019.Q3[/TD]
[TD="align: center"]2019.Q4[/TD]
[/TR]
[TR]
[TD]Variable 1
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 1
[/TD]
[TD="align: center"] 59
[/TD]
[TD="align: center"] 97[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 5[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 1[/TD]
[TD="align: center"] 117[/TD]
[TD="align: center"] 80[/TD]
[TD="align: center"] 139[/TD]
[TD="align: center"] 239[/TD]
[TD="align: center"] 185[/TD]
[TD="align: center"] 180[/TD]
[TD="align: center"] 173[/TD]
[TD="align: center"] 175[/TD]
[TD="align: center"] 178[/TD]
[TD="align: center"] 175[/TD]
[TD="align: center"] 175[/TD]
[TD="align: center"] 425
[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 418[/TD]
[TD="align: center"] 125[/TD]
[TD="align: center"] 283[/TD]
[TD="align: center"] 62[/TD]
[TD="align: center"] 117[/TD]
[TD="align: center"] 245[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 99[/TD]
[TD="align: center"] 149[/TD]
[TD="align: center"] 80[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 12[/TD]
[TD="align: center"] 30[/TD]
[TD="align: center"] 18[/TD]
[TD="align: center"] 5[/TD]
[TD="align: center"] 3[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 176[/TD]
[TD="align: center"] 315[/TD]
[TD="align: center"] 284[/TD]
[TD="align: center"] 142[/TD]
[TD="align: center"] 176[/TD]
[TD="align: center"] 91[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"] 108[/TD]
[TD="align: center"] 396[/TD]
[TD="align: center"] 50[/TD]
[TD="align: center"] 62[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 10[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"] 124[/TD]
[TD="align: center"] 428[/TD]
[TD="align: center"] 72[/TD]
[TD="align: center"] 186[/TD]
[TD="align: center"] 76[/TD]
[TD="align: center"] 51[/TD]
[TD="align: center"] 128[/TD]
[TD="align: center"] 18[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 64[/TD]
[TD="align: center"] 96[/TD]
[TD="align: center"] 44[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 55[/TD]
[TD="align: center"] 25[/TD]
[TD="align: center"] 30[/TD]
[TD="align: center"] 21[/TD]
[TD="align: center"] 6[/TD]
[TD="align: center"] 14[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 7[/TD]
[TD="align: center"] 10[/TD]
[TD="align: center"] 15[/TD]
[TD="align: center"] 6[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 85[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 28[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 6[/TD]
[TD="align: center"] 16[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 5[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 4[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"] 15[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 8[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 29[/TD]
[TD="align: center"] 73[/TD]
[TD="align: center"] 22[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 4[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"] 680[/TD]
[TD="align: center"] 596[/TD]
[TD="align: center"] 1,260[/TD]
[TD="align: center"] 990[/TD]
[TD="align: center"] 812[/TD]
[TD="align: center"] 967[/TD]
[TD="align: center"] 893[/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"][/TD]
[TD="align: center"] 340[/TD]
[TD="align: center"] 344[/TD]
[TD="align: center"] 731[/TD]
[TD="align: center"] 812[/TD]
[TD="align: center"] 601[/TD]
[TD="align: center"] 456[/TD]
[TD="align: center"] 1,202[/TD]
[TD="align: center"] 740[/TD]
[TD="align: center"] 517[/TD]
[TD="align: center"] 274[/TD]
[TD="align: center"] 823[/TD]
[/TR]
[TR]
[TD]Variable 3[/TD]
[TD="align: center"] 268[/TD]
[TD="align: center"] 352[/TD]
[TD="align: center"] 310[/TD]
[TD="align: center"] 502[/TD]
[TD="align: center"] 209[/TD]
[TD="align: center"] 21[/TD]
[TD="align: center"] 22[/TD]
[TD="align: center"] 71[/TD]
[TD="align: center"] 2[/TD]
[TD="align: center"] 47[/TD]
[TD="align: center"] 58[/TD]
[TD="align: center"] 33[/TD]
[/TR]
</tbody>[/TABLE]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
SUMIFS or SUMPRODUCT should be able to achieve this, can you post some sample data so we can come up with a solution for you.
 
Upvote 0
SUMIFS or SUMPRODUCT should be able to achieve this, can you post some sample data so we can come up with a solution for you.


Looks like the data didn't come through. Here is the chart.

[TABLE="width: 846"]
<colgroup><col><col><col><col span="6"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[TD]ACTUAL[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[TD]2018[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]2017.Q1
[/TD]
[TD]2017.Q2[/TD]
[TD]2017.Q3[/TD]
[TD]2017.Q4[/TD]
[TD]2018.Q1[/TD]
[TD]2018.Q2[/TD]
[TD]2018.Q3[/TD]
[TD]2018.Q4[/TD]
[/TR]
[TR]
[TD]Variable 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Variable 1[/TD]
[TD] 59[/TD]
[TD] 97[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] 5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Variable 1[/TD]
[TD] 117[/TD]
[TD] 80[/TD]
[TD] 139[/TD]
[TD] 239[/TD]
[TD] 185[/TD]
[TD] 180[/TD]
[TD] 173[/TD]
[TD] 175[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD][/TD]
[TD] 418[/TD]
[TD] 125[/TD]
[TD] 283[/TD]
[TD] 62[/TD]
[TD] 117[/TD]
[TD] 245[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] 12[/TD]
[/TR]
[TR]
[TD]Variable 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] 176[/TD]
[TD] 315[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi Gamingguy,

Is this what you need?


Book1
ABCDEFGHI
1ACTUALACTUALACTUALACTUALACTUALACTUALACTUALACTUAL
220172017201720172018201820182018
32017.Q12017.Q22017.Q32017.Q42018.Q12018.Q22018.Q32018.Q4
4Variable 1
5Variable 159975
6Variable 111780139239185180173175
7Variable 241812528362117245
8Variable 212
9Variable 2176315
10
11
1220172018
13Variable 1731718
14Variable 2826927
Sheet1
Cell Formulas
RangeFormula
B13=SUMPRODUCT(($A$4:$A$9=$A13)*($B$2:$I$2=B$12)*$B$4:$I$9)
C13=SUMPRODUCT(($A$4:$A$9=$A13)*($B$2:$I$2=C$12)*$B$4:$I$9)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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