+ Reply to Thread
Results 1 to 5 of 5

Refresh all pivot tables automatically when a cell value changes

  1. #1
    Registered User
    Join Date
    09-30-2012
    Location
    Tel-Aviv
    MS-Off Ver
    Excel 2010
    Posts
    84

    Refresh all pivot tables automatically when a cell value changes

    Hi all,
    hope this is the right forum!

    Basically, I'd like to have a way for data in pivot tables to auto-refresh whenever a predefine cell value changes.

    What i've done so far is just to add a button to manually refresh them (of course, you can just click on the "refresh all" button from the ribbon... but I want to make it as easy as possible for the end user of the file...).

    By the way, what I've done is create check boxes which change values in raw data on which pivot tables run... so what I want to do is to have the pivots auto refresh whenever a box is checked/unchecked.


    Your help will be greatly appreciated!

    Thanks!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Refresh all pivot tables automatically when a cell value changes

    how do the checkboxes change the data-linked cells or macro? if via macro you can just add activeworkbook.refreshall to the macro
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    09-30-2012
    Location
    Tel-Aviv
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Refresh all pivot tables automatically when a cell value changes

    Hi
    linked cells.
    I added a row to the raw data set with a 0 or 1 filter.
    I linked the checkboxes to cells, near the cells i placed a unique ID that also appears in the raw data.
    the column in the raw data has a vlookup function looking at those values. if they are set to false then the value in the column gets zero, true -> 1.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Refresh all pivot tables automatically when a cell value changes

    linked cells don't trigger the change event for a sheet but you have a couple other options
    • assign a macro to the controls that refreshes the pivots
    • use the activate event of any sheet containing pivot tables to refresh the pivots
    • use the calculate event of the data sheet to update the pivot tables whenever any of its formulas recalculate

    for the last one the code would be
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-30-2012
    Location
    Tel-Aviv
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Refresh all pivot tables automatically when a cell value changes

    Thanks a lot!
    What I ended up doing was to assign a refresh all macro to the checkboxes (each individually)

    Sub refreshall()
    ActiveWorkbook.refreshall
    End Sub


    Thanks a lot for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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