Excel - How to Refresh a Pivot Table Automatically (Windows and Mac)

One of the downsides of Pivot Tables is that they don’t automatically update when the source data changes. You have to remember to refresh them and if you forget, that could lead to misinformation and incorrect decision making.
In this video, I’ll show you, in both Excel for Mac and Excel for Windows, how to automate refreshing a Pivot Table using a single line of VBA code.
Link to "How to Fix Variable uses an Automation type not supported Error in VBA Editor in Excel for Mac" video: • How to Fix “Variable u...
🗒 Notes and Resources
Download a copy of the files used in this video: share.getcloudapp.com/nOu1E8Lm
✅ Want more FREE training?
Why not check out my other tutorials and/or subscribe to my newsletter, both of which can be done at theexceltrainer.co.uk
🙋‍♂️ Let's connect on social
Twitter: / theexceltrainer
Facebook: / theexceltrainer
LinkedIn: / thomasmik
#excel #pivottable #vba

Пікірлер: 19

  • @gsgrady
    @gsgrady14 күн бұрын

    Very succint, interesting, and most importantly, useful. Thanks Mike!

  • @MikeThomas67

    @MikeThomas67

    12 күн бұрын

    Very welcome!

  • @rstevenhanson
    @rstevenhanson Жыл бұрын

    Bro, excellent job. Went through several other vids that didn't do as quick or thorough of a job. Thank you!

  • @kroyle5328
    @kroyle5328 Жыл бұрын

    Thank Mike, excellent and very helpful video.

  • @RenierWessels
    @RenierWessels Жыл бұрын

    Great video. Thanks Mike!!

  • @allenripperden143
    @allenripperden1433 ай бұрын

    Thanks Mike for this video. Well done.

  • @MikeThomas67

    @MikeThomas67

    3 ай бұрын

    Very welcome

  • @AndwarMuhammad
    @AndwarMuhammad5 ай бұрын

    thanks, very helpfull

  • @MikeThomas67

    @MikeThomas67

    5 ай бұрын

    You're welcome!

  • @michaelgrammo4224
    @michaelgrammo42244 ай бұрын

    Thanks Mike - how do you make the auto refresh occur without needing to switch worksheets?

  • @MikeThomas67

    @MikeThomas67

    4 ай бұрын

    You'd have to pick a different event for the macro to run against. I chose the worksheet_deactivate event but there are others however I'm not sure if any of the other events would work from a logic or performance point of view for example the SelectionChange event runs when the cursor moves from one cell to another nut do you really want the refresh happening every time a different cell is selected?

  • @DJKnightrin
    @DJKnightrin10 ай бұрын

    Can this work with power pivot table?

  • @MikeThomas67

    @MikeThomas67

    9 ай бұрын

    @DJKnightrin Yes it does - On Windows! The VBA code refreshes all pivot tables in the file not matter whether they are "classic" ones or power pivot ones. On a Mac, if you manually do Data > Refresh All you get an error message because Excel for Mac doesn't support the Data Model/Power Pivot. However if I create a macro that automates RefreshAll and run the macro I don't get an error - but whether the Pivot Table has refreshed I don't know

  • @stefankleinhans4895
    @stefankleinhans48953 ай бұрын

    Good Day, after saving my excel workbook and exiting, upon reopening the document the macro is gone. is there a permanent solution to keep it there always

  • @MikeThomas67

    @MikeThomas67

    3 ай бұрын

    @stefankleinhans4895 If the file was an XLSX file, once you have added a macro to it you must "Save As" and choose XLSM (Macro Enabled Workbook) as the file type. If you re-save as an XLSX file the macro is lost because Excel does not let you save macros in XLSX files.

  • @catalinalemus6214
    @catalinalemus6214 Жыл бұрын

    Hi Mike. One question, does the pivot table have to be on another sheet?

  • @MikeThomas67

    @MikeThomas67

    Жыл бұрын

    @catalinalemus6214 If the Pivot Table was on the same sheet you would need to find an appropriate "event" for the VBA code to hook into (in my example it was switching from one sheet to another) so I think it's easier if the Pivot Table is on a separate sheet but in theory it should work on the same sheet

  • @catalinalemus6214

    @catalinalemus6214

    Жыл бұрын

    @@MikeThomas67 It worked. You just have to switch sheets for a moment in order for it to work and refresh the pivot table.

  • @MikeThomas67

    @MikeThomas67

    Жыл бұрын

    @catalinalemus6214 That's called logical thinking - well done!