Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a PivotTable and would like to selectively display PivotItems.
I'm running the following code which will only display the "install dates" for the next 7 days starting with the current date although I do want all of the dates available for display. The code works, but is very slow since the there are hundreds of unique PivotItems. Is there a ways to set all of the PivotItems visibility to FALSE and then only set the ones I want displayed to TRUE. Looking for a faster more efficient technique. With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Install Date") y = .PivotItems.Count - 1 For x = 1 To y .PivotItems(x).Visible = False Next .PivotItems("1/20/2009").Visible = True .PivotItems("1/21/2009").Visible = True .PivotItems("1/22/2009").Visible = True .PivotItems("1/23/2009").Visible = True .PivotItems("1/24/2009").Visible = True .PivotItems("1/25/2009").Visible = True .PivotItems("1/26/2009").Visible = True .PivotItems(y + 1).Visible = False End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Controlling Pivotitems.visible | Excel Discussion (Misc queries) | |||
PIvotitems visible | Excel Programming | |||
Error 1004 with PivotItems.Visible | Excel Programming | |||
Visible PivotItems matching criteria | Excel Programming | |||
Always keep the same 4 PivotItems visible | Excel Programming |