refreshing a pivot table

G

Guest

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
 
D

Debra Dalgleish

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top