Sum multiple criteria along X and Y axis

EdStockton

New Member
Joined
Aug 6, 2014
Messages
47
I need help in finding totals of multiple criteria along both the X and Y axis.

Atlanta
Cleveland
Reno
Hamburg
Decatur
Dekalb
Hornbrook
Hilt
Yreka
Redding
Red Bluff
Carson City
Tillimook
Coke
10
4
13
6
8
4
3
2
6
3
2
4
7
Pepsi
1
12
5
43
56
1
2
5
7
9
6
9
2
Milk
6
5
8
8
8
7
7
10
10
10
9
10
12
Water
5
2
4
4
4
6
3
6
5
6
7
5
8
Diet Coke
5
8
9
2
9
7
11
9
4
12
8
13
10
Squirt
25
42
5
6
5
42
42
5
8
16
47
42
6
Orange Juice
12
6
8
4
1
24
7
9
4
12
25
7
10
Apple Juice
44
31
2
8
5
56
31
3
12
14
61
31
3
Grape Juice
62
5
5
9
6
64
5
8
10
18
64
5
12
Tomato Juice
31
81
32
4
4
72
82
32
4
38
76
83
32
Root Beer
52
84
4
2
2
136
84
4
3
93
138
84
4
Coke
Cleveland
Orange Juice
Hilt
Tomato Juice
Red Bluff
Equals a sum of 237

<tbody>
</tbody>


As you can see, I have tree criteria related to the vertical axis and three criteria related to the horizontal axis. In practice, I often have more than three criteria for both axes. I cannot use the sumifs because I would have to change the formula for every use and I will need to use the formula thousands of times.

Any help will be appreciated.

Thank you, Ed Stockton
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try this:

ABCDEFGHIJKLMN
1AtlantaClevelandRenoHamburgDecaturDekalbHornbrookHiltYrekaReddingRed BluffCarson CityTillimook
2Coke104136843263247
3Pepsi1125435612579692
4Milk658887710101091012
5Water5244463656758
6Diet Coke58929711941281310
7Squirt25425654242581647426
8Orange Juice126841247941225710
9Apple Juice443128556313121461313
10Grape Juice6255966458101864512
11Tomato Juice31813244728232438768332
12Root Beer5284422136844393138844
13
14Y-AxisX-AxisSum
15CokeCleveland237
16Orange JuiceHilt
17Tomato JuiceRed Bluff
18

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
C15=SUMPRODUCT(ISNUMBER(MATCH(A2:A12,A15:A17,0))*ISNUMBER(MATCH(B1:N1,B15:B17,0))*B2:N12)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Put the values you want in the A15:B17 cells and the formula in C15.
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,020
Members
449,203
Latest member
tungnmqn90

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