I was wondering if someone could help me write a macro that would filter a pivot table based on a variable project number.

In the first tab "CoverSheet", this is where I have my report and in cell C4 is where the project number will be selected. I have a macro currently that will loop through my list of 150 projects and place the value in C4

I need the value in C4 to be the value that the pivot table will use to filter. In my example, my data sheet only has 25 lines but my real data sheet has 15,000.

I tried to do a macro that will deselect the filters and then select the new filter but this was taking over 20 minutes to complete because I have so many lines of data.


Thanks for your help, this would save me many, many hours!

Here is my example.

Macro Pivot Example3.xls