Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
automatic macro update | Excel Worksheet Functions | |||
Date macro | Excel Discussion (Misc queries) | |||
refresh pivot tables through a macro | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) |