Hi Everyone,
I have some pivot tables that contain 10's of thousands of data lines, and each line has a rep name in a PivotField "Rep". Rep names change dynamically and there are approximately 100 reps.
I want the ability to turn visibility off, of all reps in the pivot field, except when the rep field contains a string value of "repname".
This is to selectively copy data out to individual files that do not contain the full pivot source.
In effect, I want to accomplish the below by saying "make all reps not visble, except if name = Harry"
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Rep")
.PivotItems("John").Visible = False
.PivotItems("Harry").Visible = True
.PivotItems("Fred").Visible = False
end with
I hope that makes sense!
Greg
I have some pivot tables that contain 10's of thousands of data lines, and each line has a rep name in a PivotField "Rep". Rep names change dynamically and there are approximately 100 reps.
I want the ability to turn visibility off, of all reps in the pivot field, except when the rep field contains a string value of "repname".
This is to selectively copy data out to individual files that do not contain the full pivot source.
In effect, I want to accomplish the below by saying "make all reps not visble, except if name = Harry"
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Rep")
.PivotItems("John").Visible = False
.PivotItems("Harry").Visible = True
.PivotItems("Fred").Visible = False
end with
I hope that makes sense!
Greg