Subtotals

S

STEVEB

Hi,

Does anyone have any suggestions for the following:

I am trying to subtotal by account & then division. My code works fin
except the last division subtotal is below the account total. My cod
is as follows:

Range("A1").Select
Application.CutCopyMode = False
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(7, 8
9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=5, Function:=xlSum, TotalList:=Array(7, 8
9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(7, 8
9), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True

Here is an example of the result (I would like the 2090 total above th
62973 total)
Division Account
40 0005 0 12144 62973
0005 Total
40 0641 0 13051 62973
0641 Total
40 2090 0 11878 62973
62973 Total
2090 Total


Any help would be greatly appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

subtotal question 1
Subtotal by VBA 5
Subtotal function 2
Subtotal Formatting 2
Using Subtotal: How to update TotalList:= 2
strange problem subtotal 1
sub total array 1
Excel Subtotals 2

Top