+ Reply to Thread
Results 1 to 2 of 2

Auto-refresh pivot table?

  1. #1

    Auto-refresh pivot table?

    Hi. Is there a way to set up a pivot table so it will automatically
    update when its source data changes. It seems that by default, I need
    to explicitly tell it to refresh.

    Thanks!

    Ken


  2. #2

    Re: Auto-refresh pivot table?

    [email protected] wrote:
    > Hi. Is there a way to set up a pivot table so it will automatically
    > update when its source data changes. It seems that by default, I need
    > to explicitly tell it to refresh.
    >
    > Thanks!
    >
    > Ken


    I'll answer my own question. Enter the following VBA code for the
    worksheet that contains the pivot table (get to the code by entering
    alt+F11):

    Private Sub Worksheet_Activate()

    'update pivot table when sheet becomes active

    Sheets("NameOfWorksheet").PivotTables("NameOfPivotTable").RefreshTable

    End Sub

    If you have made a chart from the Pivot table, enter the following VBA
    for the Chart:

    Private Sub Chart_Activate()

    'update pivot table when chart becomes active

    Sheets("NameOfWorksheet").PivotTables("NameOfPivotTable").RefreshTable

    End Sub

    This in insures that the data will be up to date whenever the table or
    chart is viewed.

    I hope other's will find this useful!

    See ya,

    Ken


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1