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: 7
Default Pivot table "Group and Show Details" vs. "SubTotals"


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
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
Create Pivot Table Data with Column "Sum" rather than "count" defa Johnny_99[_2_] Excel Discussion (Misc queries) 2 January 2nd 10 03:25 PM
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters tommcbrny Excel Discussion (Misc queries) 1 October 29th 09 03:08 AM
Hide "Show details" when right click on data field in Pivot Table Anh Tuan Excel Discussion (Misc queries) 0 June 18th 09 07:57 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 03:45 PM.

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"