Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() In a Pivot table, When the "Group and Show Details" of a group is set to "Show Details", i.e. the details are visible, it is fairly easy to find out if the subtotal has been set to "none" or "Automatics": For cdx = 1 To Application.WorksheetFunction.Min(UBound(ActiveShe et.PivotTables("PivotTable1").RowRange.Cells.Value 2, 2), 4) If ActiveSheet.PivotTables("PivotTable1").RowRange.Ce lls(cdx) < "Article-no. + descr." Then SubtotalName = ActiveSheet.PivotTables("PivotTable1").RowRange.Ce lls(cdx) ColNam = "'" & Replace(SubtotalName, "'", "''") & "'[All;Total]" IsSubtotalVisible = ActiveSheet.PivotTables("PivotTable1").PivotFields (SubtotalName).Subtotals(1) If IsSubtotalVisible Then ActiveSheet.PivotTables("PivotTable1").PivotSelect ColNam, xlDataAndLabel, True Selection.Interior.ColorIndex = RowBoundCol(cdx) Selection.Interior.Pattern = xlSolid Selection.WrapText = False End If End If Next But this code fail is the "Group and Show Details" of a group was set to "Hide Details" while the subtotal is still on "Automatic". This mean, the subtotal is here, but not visible. As you can see, I try here to color automatically the subtotal background. How can I set IsSubtotalVisible to false if the "Group and Show Details" of the group was set to "Hide Details" ??? Thanks for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create Pivot Table Data with Column "Sum" rather than "count" defa | Excel Discussion (Misc queries) | |||
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters | Excel Discussion (Misc queries) | |||
Hide "Show details" when right click on data field in Pivot Table | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |