+ Reply to Thread
Results 1 to 15 of 15

Refresh all pivot tables upon change of data in a single cell

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Refresh all pivot tables upon change of data in a single cell

    I am trying to refresh all pivots in my workbook upon click and change of text in one cell on the first tab of my work book. This cell is called "G8_Select" (which is really just cell D4 on my G8 Summary tab). I tried to use this code but it didnt seem to work:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "G8_Select" Then
    ActiveWorkbook.RefreshAll
    End If
    End Sub

    Can someone let me know what I might be doing wrong?

    Thanks,
    Kelly

  2. #2
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Refresh all pivot tables upon change of data in a single cell

    Hi KAC1979,

    There might be some hyperlink error occured in the cell "G8_Select". Please check that or can you upload the sample file.

    Thanks,
    aganesan99

  3. #3
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    How do i know if there is a hyperlink. I right clicked and there doesnt seem to be a hyperlink. I just re-entered the code and now it does seem to be doing SOMETHING when i click on the cell to change the value. It starts calculating, but it doesn't actually update the pivots. Do I need to do something other than Refresh All to get it to know to update the whole workbook?

  4. #4
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Refresh all pivot tables upon change of data in a single cell

    Hi,

    I can't figure out the problem unless I see a sample workbook. Or some expert might be helping you.

    Thanks,
    aganesan99

  5. #5
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    ok thanks, i can't load the information because its private. I would change to dummy data but that would take some time. I am going to try to find someone else to help.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Refresh all pivot tables upon change of data in a single cell

    The name of the named range does not match the address property of the target cell. Try this:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  7. #7
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    thanks i just tried that and it still doesnt work.

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Refresh all pivot tables upon change of data in a single cell

    Quote Originally Posted by KAC1979 View Post
    thanks i just tried that and it still doesnt work.
    What is the error message?

  9. #9
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    no error message at all, but the pivot tables are not updating when i change the value in the cell "G8_Select"

  10. #10
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    Ok it works, but i am testing it now........

  11. #11
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    G8_Select is a drop down field. I don't actually want anything to update until I make a change to the field, but it seems to be making updates when i click on the field (before i have a chance to pick the value i want)

  12. #12
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    Also, do you know if i can add a message to the user saying "refreshing" and "Refresh complete"?

  13. #13
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Refresh all pivot tables upon change of data in a single cell

    Quote Originally Posted by KAC1979 View Post
    G8_Select is a drop down field. I don't actually want anything to update until I make a change to the field, but it seems to be making updates when i click on the field (before i have a chance to pick the value i want)
    It's set to fire on the Worksheet_SelectionChange event. If you want it to refresh data only when the value of this cell changes, then call it from the Worksheet_Change event instead.

    So, with some messaging as well:

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    11-12-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Refresh all pivot tables upon change of data in a single cell

    thank you soooooooo much for your help. everything is working perfectly now. Couldn't have done it without you!

  15. #15
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Refresh all pivot tables upon change of data in a single cell

    Great, glad you're sorted.

    You may want to 'Add Reputation' if you've found my posts helpful. And don't forget to mark the thread as 'Solved'

+ 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. Single drop down list to change multiple pivot tables/charts.
    By ZeDoctor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2013, 11:31 AM
  2. [SOLVED] Refresh all pivot tables automatically when a cell value changes
    By ANS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2013, 04:41 AM
  3. Refresh pivot tables on cell change
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2011, 07:04 AM
  4. Automatically refresh pivot tables after data entry
    By Hodgepodge in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2011, 06:27 AM
  5. Pivot Tables - Missing Data after refresh
    By Gr8Day in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-07-2006, 10:00 AM

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