Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you get rid of a 'automatic subtotals' format problem? | Excel Discussion (Misc queries) | |||
Subtotals problem: Excel 2003 (not, AFAIK, the nested subtotals bug) | Excel Discussion (Misc queries) | |||
Problem with Subtotals | Excel Worksheet Functions | |||
Problem with nested subtotals, placing secondary subtotals BELOW . | Excel Discussion (Misc queries) | |||
Subtotals Problem when Filtering | Excel Discussion (Misc queries) |