View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Hide all items in Pivot Field except specific items

Hi
Make everything invisible then make the ones you want visible

e.g
Dim PI as PivotItem
With .PivotFields("MYFIELD")
For Each PI In .PivotItems
PI.Visible = False
Next PI
.PivotItems("Item1").Visible = True
.PivotItems("Item2").Visible = True
.PivotItems("Item3").Visible = True
.PivotItems("Item4").Visible = True
End With

regards
Paul

On Jun 18, 8:21*pm, VAMS wrote:
Howdy:

My workbook contains about ten tabs, each with one or two pivot tables. *
Each table has a field (called "SP") listing about 50 salespeople. *The list
varies periodically based on the source data.

Thanks to this community, I have a macro to successfully select a single
name in each table.

However, now I need a way to deselect All items, then select only 4
particular salespeople in each table. *

Ideas, please? * BTW, I run Excel 2007, but have to save files in 97/2003.

Thank you.