jmkbrown
asked on
Setting the filter value of all pivot tables
I have a spreadsheet with multiple pivot tables on multiple sheets. Each Monday additional information is added to the data behind the pivot table. I have created a script that will refresh all of the pivot tables, but I would also like for the script to update the filter value on all pivot tables to the most current date.
Thank you in advance for any help you can provide.
Thank you in advance for any help you can provide.
In the data source create a column with a formula that determines whether the data for a particular row is Current or Previous.
In the Pivot Table then filter on Current rather than Date. When the Pivots refresh they will change to valid filter already.
In the Pivot Table then filter on Current rather than Date. When the Pivots refresh they will change to valid filter already.
ASKER
Attached is a sample of the spreadsheet. All tables are pointed to the same source. They will all need to have the same date. The script is manually executed.
SampleClass.xlsm
SampleClass.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked perfectly! Thank you very much!
Will different pivot tables having different most current dates?
How you executed your scripts? By a button or when the workbook is opened?
Do you have a sample to upload for us?