Hi All,
I'm trying to figure out how to write a macro for changing date in a pivot table.
I have a pivot table that I update every.
The pivot table data contains accumulated data from the begining of the month.
Each day I add data from yesterday, except for Sunday, in which I add data from Thursday (my data never includ Friday and Saturday).
So if today is Sunday 22/08/2010, I added data for Thursday 19/08/2010
And I need to change the date 19/08/2010 in my pivote table after refreshing it.
This is the macro for refreshing the pivot table and chaning the date for 15/08/2010
Range("E8").Select
ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable2").PivotFields("end serv date").CurrentPage _
= "15/08/2010"
How do I make it dynamic so the macro will change the date to the next day
Thanks
Bookmarks