I am trying to filter out everything with VBA and select only those items that I need. I had found something similar to the code previously on the internet. However, it doesn't seem to work
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Make Buy")
For i = 1 To .PivotItems.Count
.PivotItems(i).Visible = False
Next i
On Error Resume Next
.PivotItems("MAKE").Visible = True
End With
I want to deselect everything. and then select only MAKE. if there are situations where there are NEW items added, it should be able to catch those as well.
Bookmarks