Dear Forum,

I'm currently working on a global sales analysis of the company i work for using pivot tables and macro's.
The goal is to be able to load in new sales data into the pivot table, and get filtered data just by pressing buttons( macro's).
This is not so hard, but the problem occurs when you load in new sales data with either new Article numbers or new clients.

Because when recording the macro, it is recording all the items that you DON'T want to select, instead of the items you do want to select.
Because of this, when loading in new sales data with new article numbers, the new article numbers will automaticly be visible as they were not set to False in the original Macro.

for example:

With ActiveSheet.PivotTables("Draaitabel5").PivotFields("agi_art")
.PivotItems("100005").Visible = False
.PivotItems("100005NL").Visible = False
.PivotItems("100057").Visible = False
.PivotItems("100057NL").Visible = False
.PivotItems("100062NL").Visible = False
.PivotItems("100064").Visible = False
...

I would like to be able to write my filtering macro so it would say something like this:

With ActiveSheet.PivotTables("Draaitabel5").PivotFields("agi_art")
.PivotItems("100005").Visible = True
.PivotItems("All other article numbers").Visible = False

Any help would be appreciated.

Thank you in advance.