Code:
With ActiveSheet.PivotTables("PivotTable54").PivotFields("Date")
.PivotItems("Aug 21").Visible = True
.PivotItems("Code").Visible = False
.PivotItems("Dec 21").Visible = True
.PivotItems("Nov 21").Visible = True
.PivotItems("Oct 21").Visible = True
.PivotItems("Sep 21").Visible = True
.PivotItems("Jan 22").Visible = True
.PivotItems("Feb 22").Visible = True
.PivotItems("Mar 22").Visible = True
.PivotItems("Apr 22").Visible = True
.PivotItems("May 22").Visible = True
.PivotItems("Jun 22").Visible = True
.PivotItems("Jul 22").Visible = True
.PivotItems("(blank)").Visible = False
End With
ActiveSheet.PivotTables("PivotTable54").PivotSelect "'Sep 21'", xlDataAndLabel _
+ xlFirstRow, True
Range("A325").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Sep 21" _
).Position = 1
Range("A321").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Sep 21" _
).Position = 2
Range("A324").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Code"). _
Position = 3
Range("A325").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Oct 21" _
).Position = 1
Range("A321").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Oct 21" _
).Position = 2
Range("A322").Select
ActiveSheet.PivotTables("PivotTable54").PivotFields("Date").PivotItems("Oct 21" _
).Position = 3
i have a bunch of pivot tables and that require these actions...any way to do this in VBA where it loops through all of them and performs these actions?