SUbtotal
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! -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=49157 |
All times are GMT +1. The time now is 10:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com