+ Reply to Thread
Results 1 to 2 of 2

Auto Update Range of a Pivot Table

  1. #1
    Registered User
    Join Date
    04-05-2006
    Posts
    6

    Auto Update Range of a Pivot Table

    I have created a simple data base and pivot table / report. I would like the pivot table to automatically update to a new range (if data has been added to the next available row of course) in addition to updating existing data. Can anyone help with this. I have used this to auto update the existing data when the sheet is activated.

    Option Explicit

    Private Sub Worksheet_Activate()

    ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh

    End Sub

    Works great. Thanks

    Terri

  2. #2
    Dave Peterson
    Guest

    Re: Auto Update Range of a Pivot Table

    Take a look at defining a range name that grows and contracts based on your
    data.

    See Debra Dalgeish's site for some nice tips:
    http://contextures.com/xlNames01.html#Dynamic

    TJDeborah wrote:
    >
    > I have created a simple data base and pivot table / report. I would
    > like the pivot table to automatically update to a new range (if data
    > has been added to the next available row of course) in addition to
    > updating existing data. Can anyone help with this. I have used this
    > to auto update the existing data when the sheet is activated.
    >
    > Option Explicit
    >
    > Private Sub Worksheet_Activate()
    >
    > ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
    >
    > End Sub
    >
    > Works great. Thanks
    >
    > Terri
    >
    > --
    > TJDeborah
    > ------------------------------------------------------------------------
    > TJDeborah's Profile: http://www.excelforum.com/member.php...o&userid=33186
    > View this thread: http://www.excelforum.com/showthread...hreadid=533987


    --

    Dave Peterson

+ 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