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: 152
Default Pivot Table - How do I "Show All Data" of a particular field?

Hi Experts,
I have a pivot table with some fields containing a large amount of items.
I want to have a button that first makes ALL items visible in a particular
field and then just hides certain ones. This way as more values are added,
the macro doesn't have to worry about clearing items unknown to me now.

The Record Macro works great to specify exactly what I want to make visible
or not but it I was wondering if there's a global property for a field to
make all items visible? Or do I have to go through each item, see if it's
visible and if it's not, set visible = true?

Also, I'm not sure if there's a way, but maybe if someone can show me other
ways to speed up pivot changes such as turning off refreshing & calculation
etc and then turning it back on may be of help.

Thanks for the help,
Mike Zz

Below is the subroutine I have from recording a macro.
All is original except where I tried to use If items.visible = false then
make it true.
That made a little improvement but it still seems to be a little slow on the
refresh.


Sub Set_Pivot()
'

ActiveSheet.PivotTables("PivotTable1").PivotFields ("Supplier").CurrentPage = _
"XXX"
' Range("A5").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("OEM Plant")
.PivotItems("Plant 1").Visible = False
End With
' Range("A7").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Brand")
If .PivotItems("ISU").Visible = True Then .PivotItems("ISU").Visible
= False
If .PivotItems("SUZ").Visible = True Then .PivotItems("SUZ").Visible
= False
If .PivotItems("WUL").Visible = True Then .PivotItems("WUL").Visible
= False
End With
' Range("A8").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Model")
If .PivotItems("SGM12").Visible = True Then
..PivotItems("SGM12").Visible = False
If .PivotItems("SGM18").Visible = True Then
..PivotItems("SGM18").Visible = False
If .PivotItems("SGM200").Visible = True Then
..PivotItems("SGM200").Visible = False
If .PivotItems("SGM201").Visible = True Then
..PivotItems("SGM201").Visible = False
If .PivotItems("SGM258").Visible = True Then
..PivotItems("SGM258").Visible = False
If .PivotItems("SGM308").Visible = True Then
..PivotItems("SGM308").Visible = False
If .PivotItems("SGM618/J200").Visible = True Then
..PivotItems("SGM618/J200").Visible = False
If .PivotItems("SGM985").Visible = True Then
..PivotItems("SGM985").Visible = False
If .PivotItems("SGME10").Visible = True Then
..PivotItems("SGME10").Visible = False
If .PivotItems("SGME11").Visible = True Then
..PivotItems("SGME11").Visible = False
End With
ActiveSheet.PivotTables("PivotTable1").PivotFields ("OEM").CurrentPage =
"GM"
' Range("B12").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields ("PAC")
If .PivotItems("EL").Visible = True Then .PivotItems("EL").Visible =
False
End With
End Sub



 
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
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
Pivot Table - Remove "sum of" in data field abgmclt Excel Discussion (Misc queries) 2 May 26th 06 08:22 PM
"Show Field List" in Pivot Table Toolbar doesn't work Flyer27 Excel Discussion (Misc queries) 0 April 12th 06 12:05 AM
Pivot table "Group and Show Details" vs. "SubTotals" pgchop Excel Programming 0 February 1st 06 07:29 AM
Unwanted "Total" in Data Field in Pivot Table ExcelMonkey[_105_] Excel Programming 0 March 4th 04 11:51 PM


All times are GMT +1. The time now is 01:53 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"