SUbtotal

S

STEVEB

Hi All,

I am having problems with my code. I am trying to subtotal by:

1) Column A - By Group Then
2) Column B - By Division Then
3) Column E - By Account

The problem is the subtotal line for the last division is below th
account total line even though the amounts are correct. For example m
spreadsheet appears as follows:

Div 1 Total - 100
Div 2 Total - 100
Acct Total - 300
Div 3 Total - 100

My subtotal code is:

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

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


Top