#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotal To Include Item Description On Subtotal Line Tickfarmer Excel Discussion (Misc queries) 2 February 23rd 10 07:56 PM
sort macro, subtotal and add lines after subtotal David Excel Discussion (Misc queries) 1 August 29th 09 10:56 AM
pasting to subtotal lines without replacing hidden -non-subtotal l harleydiva67 Excel Discussion (Misc queries) 1 October 12th 06 06:02 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM
Sort, Subtotal, Label Subtotal, Insert row Teak Excel Programming 2 April 8th 04 04:14 PM


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"