S
Steve
I am trying to use the following code to clear all values in a Pivot table
except when it is "Need". However I do not know what may be entered into the
originating "Approval" field as several others use this spreadsheet. The
results appear in a ListBox and I only want "Need". in the below example
"David" may or may not be in the choices of the dropdown. I would like to
automate. Any help much appreciated.
With
Worksheets("Pivots").PivotTables("PivotTable3").PivotFields("Approval")
.PivotItems("David").Visible = False
.PivotItems("Dean").Visible = False
.PivotItems("Fred").Visible = False
.PivotItems("FG").Visible = False
.PivotItems("Need").Visible = True
End With
except when it is "Need". However I do not know what may be entered into the
originating "Approval" field as several others use this spreadsheet. The
results appear in a ListBox and I only want "Need". in the below example
"David" may or may not be in the choices of the dropdown. I would like to
automate. Any help much appreciated.
With
Worksheets("Pivots").PivotTables("PivotTable3").PivotFields("Approval")
.PivotItems("David").Visible = False
.PivotItems("Dean").Visible = False
.PivotItems("Fred").Visible = False
.PivotItems("FG").Visible = False
.PivotItems("Need").Visible = True
End With