+ Reply to Thread
Results 1 to 11 of 11

Refreshing a variety of Pivots tables

Hybrid View

Lorna B Refreshing a variety of... 08-06-2009, 08:06 AM
DonkeyOte Re: Refreshing a variety of... 08-06-2009, 08:17 AM
romperstomper Re: Refreshing a variety of... 08-06-2009, 08:55 AM
Lorna B Re: Refreshing a variety of... 08-06-2009, 10:13 AM
romperstomper Re: Refreshing a variety of... 08-06-2009, 10:22 AM
Lorna B Re: Refreshing a variety of... 08-06-2009, 10:38 AM
romperstomper Re: Refreshing a variety of... 08-06-2009, 10:48 AM
Lorna B Re: Refreshing a variety of... 08-06-2009, 10:54 AM
Lorna B Re: Refreshing a variety of... 08-06-2009, 10:56 AM
Lorna B Re: Refreshing a variety of... 08-06-2009, 10:59 AM
romperstomper Re: Refreshing a variety of... 08-06-2009, 11:06 AM
  1. #1
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Refreshing a variety of Pivots tables

    Hi

    Can someone help me?

    I have a document that contains a variety of pivot tables run from different spreadsheets. Is there any way you can have a programmed button to press which refreshes all the pivot tables in a wookbook?

    Please note that there are a few on different sheets of the wookbook.

    It saves me having to refresh all individual ones?

    Any help at all would be much appreciated!

    Thanx

    Lorna

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Refreshing a variety of Pivots tables

    Perhaps

    ActiveWorkbook.RefreshAll
    (pending where code is located you may want to swap Active with This)

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: Refreshing a variety of Pivots tables

    If you just want to refresh pivot tables, then you could also use:
    Sub RefreshAllPivots()
       Dim pc As PivotCache
       For Each pc In ActiveWorkbook.PivotCaches
          pc.Refresh
       Next pc
    End Sub
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Refreshing a variety of Pivots tables

    How do I put this into a formula for a cell?

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: Refreshing a variety of Pivots tables

    You can't. You did ask for a macro to run from a button, didn't you?

  6. #6
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Refreshing a variety of Pivots tables

    So do i need to add a macro with the above and when i open the spreadsheet this will automatically run??

    Sorry - I've mastered quite a few things on excel but not this.

    Thanx

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: Refreshing a variety of Pivots tables

    That is a macro.
    If you just want them to refresh when the workbook is opened, then that is an option in the pivot tables themselves - you don't need any code at all.

  8. #8
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Refreshing a variety of Pivots tables

    Sorry - New to all this,

    Im purely self taught but these little things are difficult.

    where would i get something like that - when the workbook is opened the tables refresh?

  9. #9
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Refreshing a variety of Pivots tables

    opps i found it

    thanx for your help!!

    Lorna

  10. #10
    Forum Contributor
    Join Date
    08-06-2009
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Refreshing a variety of Pivots tables

    I have another question.....

    When i open the pivot table options it give me the option to refresh when open and also refresh every ?? but the latter is greyed out? How can I choose this option?

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: Refreshing a variety of Pivots tables

    That option is only available if your data comes from an external source - not within the workbook.

+ 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