![]() |
Subtotals
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! -- STEVE ----------------------------------------------------------------------- STEVEB's Profile: http://www.excelforum.com/member.php...nfo&userid=187 View this thread: http://www.excelforum.com/showthread.php?threadid=49763 |
Subtotals
Maybe...
Multilevel subtotals are in the wrong position in Excel 2002 and in Excel 2003 http://support.microsoft.com/default...b;en-us;831824 STEVEB wrote: Hi, Does anyone have any suggestions for the following: I am trying to subtotal by account & then division. My code works fine except the last division subtotal is below the account total. My code 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 the 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!! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=497638 -- Dave Peterson |
Subtotals
Thanks Dave, I appreciate your help! -- STEVEB ------------------------------------------------------------------------ STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872 View this thread: http://www.excelforum.com/showthread...hreadid=497638 |
All times are GMT +1. The time now is 11:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com