If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro for Pivot Tables
Hi, I'm having trouble building a macro on pivot tables. I hope some experts
here can help solve my problem. Any inputs will be greatly appreciated!! I'm trying to build a macro to refresh data in multiple pivot tables. The pivot tables are build below one another, and additional rows are inserted between pivot tables. When i built a macro to link all tables to the data in the first (master) pivot table, I found Excel was refreshing the table based on the exact cell I was clicking. This has become a problem since new rows are inserted between tables when new data comes in, and pivot tables are no longer at those cells. The macro i've built cannot refer to the tables and crashed as a result. I was wondering if I can define or use a dynamic name to select a pivot table instead of selecting a cell. My colleagues does not know VB and are not interested in using codes to solve this problem. I was wondering if this can be done simply. Hope someone can offer me help. Thanks in advance. |
#2
|
|||
|
|||
You can refresh all external data ranges and PivotTables in the active
workbook, with the following code: ActiveWorkbook.RefreshAll Thomas wrote: Hi, I'm having trouble building a macro on pivot tables. I hope some experts here can help solve my problem. Any inputs will be greatly appreciated!! I'm trying to build a macro to refresh data in multiple pivot tables. The pivot tables are build below one another, and additional rows are inserted between pivot tables. When i built a macro to link all tables to the data in the first (master) pivot table, I found Excel was refreshing the table based on the exact cell I was clicking. This has become a problem since new rows are inserted between tables when new data comes in, and pivot tables are no longer at those cells. The macro i've built cannot refer to the tables and crashed as a result. I was wondering if I can define or use a dynamic name to select a pivot table instead of selecting a cell. My colleagues does not know VB and are not interested in using codes to solve this problem. I was wondering if this can be done simply. Hope someone can offer me help. Thanks in advance. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
automatic macro update | Myrna Larson | Worksheet Functions | 3 | February 9th, 2005 07:10 PM |
Date macro | Hiking | General Discussion | 9 | February 3rd, 2005 12:40 AM |
Macro to replace styles used in tables (Word 2000/Windows) | [email protected] | Tables | 6 | January 26th, 2005 10:04 PM |
Including Subfolders for use within Word 2003 Macro | helpserv | General Discussion | 7 | October 6th, 2004 04:38 AM |