I am attempting to use an array to check the filtered pivot items in the pivot table to see if it should be visible or not. Currently I have it hard coded with the code below. However, I would like to use an Array when I have more then one item to check against the filter.
The goal is to only filter on the items needed.
Supply = Array("X Marketplace", "Y Marketplace")
With PivFid
For i = 1 To .PivotItems.Count
If .PivotItems(i).Name <> "X Marketplace" Then .PivotItems(i).Visible = False
Next i
End With
This is something I am trying to accomplish but I'm not sure how to loop through the array against the filtered items.
With PivFid
For i = 1 To .PivotItems.Count
If .PivotItems(i).Name <> Supply Then .PivotItems(i).Visible = False
Next i
End With