LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SubTotals Problem

I am using the following code to subtotal columns in an Excel worksheet

rRange.Subtotal 1, xlSum, iSubTotalColumns, True, False, xlSummaryBelo
rRange.Subtotal 2, xlSum, iSubTotalColumns, False, False, xlSummaryBelo
rRange.Subtotal 3, xlSum, iSubTotalColumns, False, False, xlSummaryBelo

It works fine when the values in the columns that I am grouping by vary. However, I have some cases where the value does not change in the column that I am grouping on. When that happens, the subtotals end up being displayed in the wrong order (based on their grouping level) even though they have the correct totals. (The order should be the colmun 1 subtotal, the column 2 subtotal, and last the column 3 subtotal from the code. However, when column 2 values do not vary the order ends up being column 3 subtotal, column 1 subtotal, and last column 2 subtotal.) This does not happen when I subtotal these worksheets manually in Excel, only when I do it through code in my VB program.
 
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
How do you get rid of a 'automatic subtotals' format problem? Jesus Pantoja Excel Discussion (Misc queries) 0 March 30th 09 05:14 AM
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) AndyCotgreave Excel Discussion (Misc queries) 3 October 24th 07 11:32 AM
Problem with Subtotals praveen_khm Excel Worksheet Functions 1 January 11th 06 03:40 PM
Problem with nested subtotals, placing secondary subtotals BELOW . Dawn Cameron Excel Discussion (Misc queries) 1 June 3rd 05 10:13 PM
Subtotals Problem when Filtering Brenda Rueter Excel Discussion (Misc queries) 2 February 15th 05 09:05 PM


All times are GMT +1. The time now is 09:29 AM.

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

About Us

"It's about Microsoft Excel"