Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default refreshing a pivot table

Hello:

I created a simple pivot table from an Excel spreadsheet. Then, I created a
macro to create this pivot table. You see, an external application will dump
data from GP into Excel and then the macro will automatically create a pivot
table.

This worked well until I added another record to the application's set of
data. When I ran the macro, the spreadsheet contained the additional record.
But, the pivot table was not updated by this record. When I noticed this, I
chose Data...Refresh Data. Still, the pivot table did not get refreshed.

Is there anyway to get the pivot table to automatically refresh itself with
new data and add this additional step to the macro accordingly?

Thanks!

childofthe1980s
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default refreshing a pivot table

When the query is imported, a name should be automatically created in
Excel. You can use that as the pivot table source.

To find the name:
Select the sheet that contains the imported data
Right-click on a cell in the imported data range
Choose Data Range Properties, and the range name is at the top
Click OK

Press the F3 key on the keyboard, to open the list of defined names
Look for the imported data name in list. It may be slightly modified,
with underscores replacing the spaces.

Right-click a cell in the Pivot Table
Choose Wizard, and click the Back button
In the data range box, replace the existing reference with the import
data sheet name and range name, e.g.:
ImportSheet!Import_Range_Name
Click Finish


childofthe1980s wrote:
Hello:

I created a simple pivot table from an Excel spreadsheet. Then, I created a
macro to create this pivot table. You see, an external application will dump
data from GP into Excel and then the macro will automatically create a pivot
table.

This worked well until I added another record to the application's set of
data. When I ran the macro, the spreadsheet contained the additional record.
But, the pivot table was not updated by this record. When I noticed this, I
chose Data...Refresh Data. Still, the pivot table did not get refreshed.

Is there anyway to get the pivot table to automatically refresh itself with
new data and add this additional step to the macro accordingly?

Thanks!

childofthe1980s



--
Debra Dalgleish
Contextures
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
Refreshing a pivot table Neville Bailey[_2_] Excel Discussion (Misc queries) 1 November 16th 08 05:47 PM
Pivot table refreshing Daniel Excel Discussion (Misc queries) 5 July 12th 07 05:02 PM
When refreshing pivot tables my pivot table chart type changes hannah220507 Excel Discussion (Misc queries) 1 May 22nd 07 02:57 PM
Pivot Table refreshing Steve Wadey Excel Programming 0 November 2nd 04 10:08 PM
OfficeXP "Cannot open pivot table source file" when refreshing pivot table Luc Alquier Excel Programming 2 December 9th 03 11:11 PM


All times are GMT +1. The time now is 03:00 PM.

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"