I am trying to use the following type of code below but have a problem. My values are listed in a range from cells H13:P13 but am not sure how many will be populated (coming from a list box). I need those values to be the filter in a pivot table like below. Any ideas??
Code:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Brand")
.PivotItems(brand_one).Visible = True
For Each pi In .PivotItems
Select Case UCase(pi.Name)
Case UCase(brand_one), UCase(brand_two)
pi.Visible = True
Case Else
pi.Visible = False
End Select
Next pi
End With