How to Refresh a Pivot Table in Excel

80+ Excel Keyboard Shortcuts ➜

✍️ Written by Puneet Gogia (Microsoft MVP)

Quick answer

To refresh all pivot tables at once, press Ctrl + Alt + F5, or go to Data ➜ Refresh All on the ribbon. Both update every pivot in the workbook in one click.

  • Fastest: the Refresh All button (or Ctrl+Alt+F5).
  • Hands-free on open: tick "Refresh data when opening the file" in PivotTable Options.
  • Hands-free on edit: a one-line macro, ThisWorkbook.RefreshAll, on the sheet's change event.
  • Not updating? New rows fall outside the source range — base the pivot on a Table so refresh always catches them.

When you change the data behind a pivot table, the pivot doesn't update on its own — you have to refresh it. And if you've got ten pivots in a workbook, refreshing them one by one is exactly the kind of boring, repeatable job you shouldn't be doing by hand.

The good news: Excel lets you refresh every pivot table at once, so ten pivots take a single click instead of ten. In this tutorial, I'll walk you through four simple ways to do it — a button, a keyboard shortcut, an automatic refresh when you open the file, and a bit of VBA for full control.

NOTE: Pivot tables are one of the intermediate Excel skills. These steps may vary slightly depending on your version of Excel.

1. Use the "Refresh All" button (all pivots, one click)

The Refresh All button is the simplest way to update every pivot table in a workbook at once.

  • Select a pivot table. Click any cell inside one of your pivots — this tells Excel your next action is about pivot tables.
  • Go to the PivotTable Analyze tab. This tab only appears on the ribbon when a pivot is selected.
  • Open the Refresh drop-down. In the Data group, click the small arrow on the Refresh button.
  • Choose "Refresh All". This updates every pivot table in the workbook, not just the selected one.
Refresh drop-down on Excel's PivotTable Analyze tab, with the Refresh All option to update all pivot tables at once

You can also skip the pivot entirely and use Data tab ➜ Refresh All (in Queries & Connections). Prefer the keyboard? Press Alt A R A in sequence to fire Refresh All without touching the mouse.

2. Refresh all pivots automatically when you open the file

If you'd rather not remember to refresh at all, set the workbook to refresh its pivots every time it opens. It's a one-time setup.

  • Select any pivot table (a single cell inside it is enough).
  • Right-click and choose "PivotTable Options…".
  • In the dialog box, go to the Data tab and tick "Refresh data when opening the file". Click OK.
Right-click menu on an Excel pivot table showing the PivotTable Options command PivotTable Options dialog, Data tab, with the Refresh data when opening the file checkbox ticked

One caveat: on large workbooks this refresh runs before the file is usable, so it can noticeably slow down opening. For heavy models, I'd keep this off and use a manual Refresh All (or a button) instead.

3. Refresh all pivots with a keyboard shortcut

Once the workbook is open, refresh every pivot table by pressing:

Ctrl + Alt + F5

This runs the same Refresh All as the ribbon. Depending on the size of your pivots and your machine, it may take a moment.

On a Mac: there's no single shortcut to refresh all pivots. Cmd + Shift + F5 refreshes the selected pivot — for all of them, use Data ➜ Refresh All from the ribbon.

3. Refresh all pivots with a keyboard shortcut

Once the workbook is open, refresh every pivot table by pressing:

Ctrl + Alt + F5

This runs the same Refresh All as the ribbon. Depending on the size of your pivots and your machine, it may take a moment.

On a Mac: there's no single shortcut to refresh all pivots. Cmd + Shift + F5 refreshes the selected pivot — for all of them, use Data ➜ Refresh All from the ribbon.

4. Refresh all pivots with VBA

If you want a one-click macro (or you're already automating the workbook), VBA is the cleanest route. To refresh every pivot, query and connection in the workbook, this single line does the job:

Sub RefreshAllPivots()
    ThisWorkbook.RefreshAll
End Sub

ThisWorkbook.RefreshAll is the same as clicking Refresh All on the Data tab — it walks the whole workbook, so you don't have to name a single sheet or pivot.

If you want to refresh pivots only (and leave other data connections alone), loop the pivot caches instead — pivots that share a cache refresh together:

Sub RefreshAllPivotCaches()
    Dim pc As PivotCache
    For Each pc In ThisWorkbook.PivotCaches
        pc.Refresh
    Next pc
End Sub

And if you only need the pivots on the sheet you're looking at, keep it local:

Sub RefreshPivotsOnThisSheet()
    Dim pt As PivotTable
    For Each pt In ActiveSheet.PivotTables
        pt.RefreshTable
    Next pt
End Sub

Refresh only specific pivot tables with VBA

To update just a few named pivots, list them explicitly:

Sub RefreshSelectedPivots()
    With ActiveSheet
        .PivotTables("PivotTable1").RefreshTable
        .PivotTables("PivotTable2").RefreshTable
        .PivotTables("PivotTable3").RefreshTable
    End With
End Sub

Change the names to match your workbook (you'll find them on the PivotTable Analyze tab, in the PivotTable Name box).

To run any of these automatically on open, put the code in the ThisWorkbook module inside a Workbook_Open event:

Private Sub Workbook_Open()
    ThisWorkbook.RefreshAll
End Sub

Note: older tutorials use a macro named auto_open for this. Workbook_Open is the modern equivalent and is what I'd use today — auto_open only survives for backward compatibility.

Bonus: refresh pivots automatically whenever the data changes

Opening the file isn't the only trigger. If you want your pivots to never sit out of step with the source, refresh them whenever the sheet changes. Put this in the code module of the sheet that holds your source data:

Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    ThisWorkbook.RefreshAll
    Application.EnableEvents = True
End Sub

The EnableEvents = False / True lines matter: without them, the refresh can re-trigger the change event and send Excel into a loop. A few readers in the comments swear by this — it means you're always looking at current numbers.

Which method should you use?

If you want to…
Use
How
Refresh on demand, fastest
Refresh All button / shortcut
Ctrl+Alt+F5, or Data ➜ Refresh All
Fresh numbers every time you open
Refresh on open
PivotTable Options ➜ Data ➜ Refresh data when opening the file
Fresh numbers whenever data changes
Worksheet_Change VBA
ThisWorkbook.RefreshAll on the change event
A one-click button or full automation
VBA macro
ThisWorkbook.RefreshAll on a button

Understanding the source data (and why refresh sometimes "doesn't work")

The source data is the original range, named range, or Excel Table your pivot is built on — every row and column it summarises.

Here's the gotcha that trips most people up: Refresh only re-reads the range the pivot already knows about. If you add new rows or columns below or beside that range, refresh won't pick them up, and it looks like the button is broken.

The fix is to base your pivot on an Excel Table (select your data and press Ctrl + T) before you create the pivot. A Table grows automatically as you add data, so a plain refresh always captures the new rows. If your pivot is on a fixed range, you'll instead need to update the source via PivotTable Analyze ➜ Change Data Source.

Frequently asked questions

What is the fastest way to refresh all pivot tables at once?

Press Ctrl + Alt + F5, or on the ribbon go to Data ➜ Refresh All. Both update every pivot table in the workbook in a single action.

Is there a keyboard shortcut to refresh all pivots on a Mac?

There's no dedicated all-refresh shortcut on Mac. Cmd + Shift + F5 refreshes the selected pivot; use Data ➜ Refresh All from the ribbon to update them all.

Why is my pivot table not updating when I refresh it?

Refresh only re-reads the existing source range, so new rows or columns fall outside it. Base the pivot on an Excel Table (Ctrl + T) so new data is included automatically, then refresh.

Do I have to refresh every pivot if they share the same source?

No. Pivots built from the same source share one pivot cache, so refreshing one refreshes all of them together.

How do I refresh pivot tables automatically when the data changes?

Add a Worksheet_Change event to the source sheet that calls ThisWorkbook.RefreshAll, wrapped in Application.EnableEvents = False / True to avoid a refresh loop.

Does refresh on file open slow down opening the workbook?

It can. On large models the refresh runs before the workbook is usable, adding a delay. For big files, prefer a manual Refresh All or a button instead.

Puneet Gogia, founder of ExcelChamps

Puneet Gogia Microsoft MVP

Puneet is a Microsoft Excel MVP with 15+ years of experience teaching Excel, VBA, and Power Query. He founded ExcelChamps to help over a million people a month get more done in spreadsheets. See the full Pivot Tables guide for more.