Objective: to use a list of items in a specified range to update a pivot chart
I know the code below points to what I am needing, but I think I need to create a variable to step through a range so that I can add them to the code below:
(something like Range = Sheets("Main").Range("A1:A10") for each i in Range update chart)
By the way, when I mean update chart I want to have the items in the list show up within the graph and the other items excluded. It seems that Excel marks everything as "false", but the items that you want shown.
Any help would be appreciated.
I know the code below points to what I am needing, but I think I need to create a variable to step through a range so that I can add them to the code below:
(something like Range = Sheets("Main").Range("A1:A10") for each i in Range update chart)
Code:
Sub updatePivotChart()
With ActiveChart.PivotLayout.PivotTable.PivotFields("Company*+")
.PivotItems("Speck Regional").Visible = False
End With
End Sub
By the way, when I mean update chart I want to have the items in the list show up within the graph and the other items excluded. It seems that Excel marks everything as "false", but the items that you want shown.
Any help would be appreciated.