Obtaining Subtotals - is there a function available?

  • Thread starter Thread starter Letmos
  • Start date Start date
L

Letmos

My data looks as follows

42350 56
42350 12
42350 9
42350 25
42350 18
42350 7
42350 46
42359 23
42359 88
42359 43
42359 80
42359 12
42362 22
42362 82
42362 3
etc.

I simply want the totals for column B by column A presented a
follows:
42350 173
42359 246
42362 107

Thanks in anticipation, Letmo
 
One quick way is to use the pivot table (PT) feature

Maybe these steps will ease you-in ..

Assume your table as posted
is in Sheet1, cols A and B

Enter labels for the 2 columns in row1,
say "Code" and "Amt".

The table will look like:

Code Amt
42350 56
42350 12
42350 9
etc

Click anywhere inside the table

Click Data > PivotTable report

Click Next > Next

In step3 of the wizard:

Drag and drop "Code" within ROW area
Drag and drop "Amt" within DATA area
(It will appear as "Sum of Amt")

Click Finish

The PT will be created in a new sheet
to the left of Sheet1

It will show as (for the sample data you posted):

Sum of Amt
Code Total
42350 173
42359 246
42362 107
Grand Total 526

And if you don't want the "Grand Total" at the bottom

Right-click anywhere in the PT > choose "Options"

Under "Format options:"
Uncheck the box for "Grand totals for columns" > OK
 
Back
Top