Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Thomas
 
Posts: n/a
Default 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   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 11:12 PM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 08:10 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 01:40 AM
refresh pivot tables through a macro dolph Excel Worksheet Functions 1 January 12th 05 04:16 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 05:46 PM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"