Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Table(s) - refresh in sheet - macro - automate
Hello:
I have two tables, in separate Work Sheets: Table1 and Table2. - Table1 and Table2 are periodically updated. Generally only the number of rows changes, up or down. I have a separate Work Sheet called Info1. There I slice and dice the data from both tables, with the use of 3 Pivot Tables, which were created side-by-side. I will have Work Sheet with pivots, called: Info2, Info3, etc. Question 1: The toolbar offers a button to refresh a Pivot table. I recorded the procedure (using a macro) called it PivotUPDT. Sub PivotUPDT() ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh End Sub How do I tweak so that this procedure refreshes any and all Pivot Tables, in an active Work Sheet, be it Info1, Info 2 or Info 3? "PivotTable1" suggests only the first Pivot Table that was created will be refreshed. Question 2: If the boundy of my Table1 or Table2 changes (i.e. less rows are present than before). In Info1, for example, I want to be able to update the range that a Pivot Table is mapped to. What is the code for that? I'm ok with making a button for each Pivot Table in Info1 as long as I know how to do it. Thanks, Pepe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to refresh the pivot table while the excel sheet in shared? | Excel Worksheet Functions | |||
Refresh Pivot Table when Sheet is PW Procted | Excel Worksheet Functions | |||
Refresh pivot table on protected sheet | Excel Discussion (Misc queries) | |||
Pivot Table Refresh Deletes Range On Different Sheet | Excel Discussion (Misc queries) | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming |