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

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024

Комментарии • 22

  • @NathanHaefer
    @NathanHaefer 11 часов назад

    This was the perfect refresher course! Thank you so much!

  • @rstevenhanson
    @rstevenhanson Год назад +1

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

  • @kroyle5328
    @kroyle5328 Год назад +1

    Thank Mike, excellent and very helpful video.

  • @gsgrady
    @gsgrady 2 месяца назад

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

  • @allenripperden143
    @allenripperden143 6 месяцев назад

    Thanks Mike for this video. Well done.

  • @RenierWessels
    @RenierWessels Год назад

    Great video. Thanks Mike!!

  • @Ohhkaleyeahh
    @Ohhkaleyeahh Месяц назад

    Hello, does this refresh in the background without having to open the file?

    • @MikeThomas67
      @MikeThomas67  Месяц назад

      @Ohhkaleyeahh Hi. No the file has to be open to do the refresh but you could tick a box so that it refreshes automatically when the file is opened

  • @michaelgrammo4224
    @michaelgrammo4224 7 месяцев назад

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

    • @MikeThomas67
      @MikeThomas67  6 месяцев назад

      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?

  • @AndwarMuhammad
    @AndwarMuhammad 7 месяцев назад +1

    thanks, very helpfull

  • @catalinalemus6214
    @catalinalemus6214 Год назад

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

    • @MikeThomas67
      @MikeThomas67  Год назад +1

      @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  Год назад +1

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

  • @stefankleinhans4895
    @stefankleinhans4895 5 месяцев назад

    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  5 месяцев назад

      @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.

  • @DJKnightrin
    @DJKnightrin Год назад

    Can this work with power pivot table?

    • @MikeThomas67
      @MikeThomas67  Год назад +1

      @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