inserting a subtotal

  • Thread starter Thread starter Smitty
  • Start date Start date
S

Smitty

I am trying to create a worksheet from another. On the new worksheet I want
to insert a subtotal line based upon a change in client name. Can anyone
tell me how to do that?
 
See Excel help on the SUBTOTAL function. It does change with filters. Very
handy.

--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott
 
Scott, This doesn't help me. I need to insert a line when the condition
changes. For example, this is what input spreadsheet looks like.

AAA 20
AAA 30
AAA 40
BBB 20
BBB 35
BBB 15
BBB 25
CCC 25
CCC 25
CCC 25

This is what I am trying to get to.
AAA 20
AAA 30
AAA 40
Subtotal AAA 90
BBB 20
BBB 35
BBB 15
BBB 25
Subtotal BBB 95
CCC 25
CCC 25
CCC 25
Subtotal CCC 75
Total 260

I am trying to avoid manual interventon and want to be able to automatically
break on the change and insert a subtotal row.
Have you goy any thoughts on this?
Smitty
 
KC

Please see the response to Scott. I am trying to create the report without
manula intervention (for several reasons). Can you help me with this?

Smitty
 
The only way to do this "automatically" as desired is with a macro, and the
easiest overall solution would be to use a pivot table with the following
macro to keep the data "live":

Private Sub Worksheet_Activate()
Me.PivotTables(1).PivotCache.Refresh
End Sub
 
Back
Top