+ Reply to Thread
Results 1 to 7 of 7

Auto refresh pivot table with linked data

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Auto refresh pivot table with linked data

    can i auto refresh a linked table data to a pivot table. The linked data is linked to another sheet.

    If the source table values change because of formula result change, the linked table change automatically but not the pivot table.

    For example, in the data table, the amount is depending on the other data table. (=+Sheet2!E1).
    If the change (=+Sheet2!E1), the data table is updated but not the pivot table.

    However if i manually update the amount in the data table, the pivot table change automately.

    I have below marco in the excel.

    Private Sub Worksheet_Change(ByVal Target As Range)
    Worksheets("sheet2").PivotTables("pvt").PivotCache.Refresh

    End Sub
    Attached Files Attached Files
    Last edited by bt123123; 09-11-2018 at 10:51 PM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Auto refresh pivot table with linked data

    I don't understand.

    Your sample shows that when you update the source table the pivot table updates.

    What else do want it to do?

  3. #3
    Registered User
    Join Date
    10-04-2012
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Auto refresh pivot table with linked data

    Hi
    I update the number in Sheet2 E1 which link to Sheet1 C2

    If I manually enter the number in Sheet1 C2, the pivot table refresh automasticlly.

    But now Sheet1 C2 link to Sheet2 E1 and the pivot table does not refresh automasticlly.

    How can I refresh the pivot table automasticlly with linked formula.

    Thanks

  4. #4
    Registered User
    Join Date
    10-04-2012
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Auto refresh pivot table with linked data

    Quote Originally Posted by kersplash View Post
    I don't understand.

    Your sample shows that when you update the source table the pivot table updates.

    What else do want it to do?
    Pls see my reply

  5. #5
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Auto refresh pivot table with linked data

    Try the attached. Moved the cell you are changing to it's own sheet then put the macro within that sheet.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-04-2012
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Auto refresh pivot table with linked data

    Do you mean I cann't have the number into the same sheet with the pivot table?

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Auto refresh pivot table with linked data

    If you have it on the same sheet then it will keep triggering the Worksheet_Change event.

    There may be another solution where you could keep it on the same sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 02-15-2018, 09:42 AM
  2. Auto-Refresh Pivot Table When Source Data Refreshes
    By XLINT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2015, 11:00 AM
  3. Macro to auto update data range and refresh pivot table does not work
    By aikido1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2014, 05:59 AM
  4. [SOLVED] Auto Refresh Pivot Table Once External Data source Changes
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 10:33 AM
  5. import data from access table to excel pivot table - Enable Auto Refresh
    By okl in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-01-2010, 09:38 AM
  6. auto refresh on pivot table
    By jimmisavage in forum Excel General
    Replies: 3
    Last Post: 12-15-2006, 08:08 AM
  7. [SOLVED] auto refresh of pivot table
    By Luc Poppe in forum Excel General
    Replies: 9
    Last Post: 09-10-2005, 01:05 PM

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