Add Subtotals For 2 Columns

EdAROC

New Member
Joined
Apr 28, 2010
Messages
26
I'm not searching correctly, because I'm sure this is answered somewhere...

Simple spreadsheet, the columns are: Customer, Category, Job#, Tons
Sorted on: Customer, Category

Want Tons subtotals for Category and Customer (and a grand total).

I can create a subtotal for one column or the other, but, I can't get subtotals for both columns.

Code:
[FONT=Courier New]
Customer  Category  Job#  Tons
ABC       Cat1         1   1.1
ABC       Cat1         2   0.8
   Subtotal Cat1           1.9

ABC        Cat2        3   2.0
ABC        Cat2        4   1.6
   Subtotal Cat2           3.6
Subtotal ABC               5.5

XYZ        Cat1        5
  {and so on}
[/FONT]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Do the SUBTOTAL command on change of Customer, then afterwards do another SUBTOTAL command for change of of Category ( making sure that "Replace Current Subtotals" is unticked ).

Excel Workbook
ABCD
1CustomerCategoryJob#Tons
2ABCCat111.1
3ABCCat120.8
4*Cat1 Total*1.9
5ABCCat232
6ABCCat241.6
7*Cat2 Total*3.6
8ABC Total**5.5
9XYZCat151.3
10XYZCat161.1
11XYZCat172.3
12*Cat1 Total*4.7
13XYZCat281.2
14XYZCat290.5
15*Cat2 Total*1.7
16XYZ Total**6.4
17DEFCat1101.1
18DEFCat1112.2
19DEFCat1122.5
20*Cat1 Total*5.8
21DEFCat2131
22DEFCat2142
23DEFCat2153
24*Cat2 Total*6
25DEF Total**11.8
26Grand Total**23.7
Sheet7
 
Upvote 0
:oops:

That's embarrassing - the answer was right in front of me all the time.

Thanks for your help Glenn.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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