ianb
Member
Hi,
I would like to know if a person has a program that can select only a select items in a pivot table.
I would like to show select memebers of a team in a pivot table when i run a macro.
I have 3 teams to show.
Below is my first and second attempt ?
Each team has for example 5 members so I need to deselect all and add 5 members.
Any Ideas ? or Prgrams welcome. Last attempt removes all except blank and I can not add members.
Sub PivotSelectTeam1()
'
'Sheets("Dashboard (Individual)").Select
'
' With ActiveSheet.PivotTables("PivotTable9").PivotFields("Individual+")
' On Error Resume Next
' .PivotItems("Name1").Visible = True
' .PivotItems("Name2").Visible = True
' .PivotItems("(Blank)").Visible = True
' On Error GoTo 0
' End With
'
'End Sub
Dim oPI As PivotItem
On Error Resume Next
For Each oPI In ActiveSheet.PivotTables("PivotTable9").PivotFields("Individual+").PivotItems
oPI.Visible = False
Next oPI
End Sub
I would like to know if a person has a program that can select only a select items in a pivot table.
I would like to show select memebers of a team in a pivot table when i run a macro.
I have 3 teams to show.
Below is my first and second attempt ?
Each team has for example 5 members so I need to deselect all and add 5 members.
Any Ideas ? or Prgrams welcome. Last attempt removes all except blank and I can not add members.
Sub PivotSelectTeam1()
'
'Sheets("Dashboard (Individual)").Select
'
' With ActiveSheet.PivotTables("PivotTable9").PivotFields("Individual+")
' On Error Resume Next
' .PivotItems("Name1").Visible = True
' .PivotItems("Name2").Visible = True
' .PivotItems("(Blank)").Visible = True
' On Error GoTo 0
' End With
'
'End Sub
Dim oPI As PivotItem
On Error Resume Next
For Each oPI In ActiveSheet.PivotTables("PivotTable9").PivotFields("Individual+").PivotItems
oPI.Visible = False
Next oPI
End Sub