+ Reply to Thread
Results 1 to 2 of 2

Refresh pivot table when source data changes

  1. #1
    Registered User
    Join Date
    11-09-2021
    Location
    Canada
    MS-Off Ver
    2102
    Posts
    1

    Refresh pivot table when source data changes

    So I'm running into an issue with some VBA code which states that if the source data changes, refresh the pivot table. If you look at image1 source, the pivot table in "Sheet 7" refresh fine if I manually change the week in A2. Which is great, the code is running in the "Calculation" sheet and as stated when you update the week number the pivot table refreshes.

    The problem is in the sheet "AMS (for product)" I have a scroll bar (Image 2 course) that changes the week number in sheet "Calculation" and ultimately updates the data based on the week it is. When I use the scroll bar to update the number, the pivot table data does not refresh when the source data changes. I tried to copy paste the same code I put into "Calculation" but it doesn't seem to have an effect.

    Please Login or Register  to view this content.
    Mod Edit: please read our rules regarding code tags & cross posting
    Attached Images Attached Images
    Last edited by AliGW; 02-18-2022 at 03:50 AM. Reason: Code tags added.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,418

    Re: Refresh pivot table when source data changes

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will do it for you this time: https://www.mrexcel.com/board/thread...anges.1196564/)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. [SOLVED] Refresh pivot table automatically when source data changes
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-01-2020, 01:06 PM
  2. [SOLVED] Refresh Pivot Table Automatically when Source Data Changes
    By SirMaceOne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2019, 02:32 AM
  3. [SOLVED] Refresh data source (excel table) in power pivot
    By maboho93 in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 06-08-2018, 04:13 AM
  4. Automatic Refresh of a pivot Table with External data source
    By AnnaLioce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2016, 07:55 AM
  5. Can't Refresh Pivot Table When Using External Data Source
    By yenping.fu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-02-2014, 06:24 AM
  6. Replies: 0
    Last Post: 08-14-2013, 06:31 AM
  7. [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

Tags for this Thread

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