Refresh PivotTable data

Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2024 Excel 2021 Excel 2019 Excel 2019 for Mac Excel 2016

At any time, you can select Refresh to update the data for the PivotTables in your workbook. You can refresh the data for PivotTables imported from Power Query, such as a database (SQL Server, Oracle, Access, and so on), Analysis Services cube, a data feed, and many other sources. You can also refresh data from an Excel table, which automatically includes all changes to its external data source.

In older versions of Excel, PivotTables are not refreshed automatically, but you can specify that the PivotTable is automatically refreshed when you open the workbook that contains the PivotTable. In newer versions of Excel, PivotTables can automatically refresh when connected to local workbook data.

Note

PivotTable Auto Refresh is currently available to participants of the Microsoft 365 Insider program.

Manually refresh

  1. Select the PivotTable to show the PivotTable Analyze tab.

  2. Select PivotTable Refresh All button Refresh in the Data group or press Alt+F5.

    Excel Ribbon Image

    Tip

    You can right-click the PivotTable and select Refresh.

  3. To update all PivotTables in your workbook at once, on the PivotTable Analyze tab, select the Refresh arrow and choose PivotTable Refresh All button Refresh All.

If refreshing takes longer than you expect, on the PivotTable Analyze tab, select the Refresh arrow and choose Refresh Status to check the refresh status.

To stop refreshing, select Cancel Refresh.

Prevent column widths and cell formatting from adjusting

If the column widths and cell formatting of your data adjust when you refresh the PivotTable data, and you don't want that to happen, make sure the following options are checked:

  1. On the PivotTable Analyze tab, select PivotTable Options button Options.
    PivotTable Options button
  2. On the Layout & Format tab, check the Autofit column widths on update and Preserve cell formatting on update boxes.

Refresh data automatically when opening the workbook

  1. Select the PivotTable to show the PivotTable Analyze tab on the ribbon.
  2. Select PivotTable Options button Options.
    PivotTable Options button
  3. On the Data tab, check the Refresh data when opening the file box.

Refresh data automatically

New PivotTables created from local workbook data will have Auto Refresh on by default.

Note

If your workbook contains existing PivotTables with Auto Refresh turned off, any new PivotTables using the same source data will also have Auto Refresh off.

There are two ways to turn Auto Refresh on or off: through the PivotTable Analyze tab or the PivotTable Options.

Important

Auto Refresh is set per data source, so turning it on or off affects all PivotTables connected to that data source.

In the PivotTable Analyze tab:

  1. Select the PivotTable to show the PivotTable Analyze tab.
    Data group within the PivotTable Analyze tab of the Ribbon. The Data group contains Auto Refresh, Refresh, and Change Data Source buttons.
  1. Select  Icon showing a document with folded top right corner, a lightning bolt in the top left, and a green circular refresh arrow in the bottom right Auto Refresh in the Data group to turn it on or off. Auto Refresh is on if the button has an outline around it. 

In PivotTable Options:

  1. Select the PivotTable to show the PivotTable Analyze tab.
  2. Select PivotTable Options button Options.
    PivotTable Options button
  3. On the Data tab, check or uncheck Automatically refresh when the data source changes.

Tip

To change the default Auto Refresh setting for new PivotTables: Go to File > Options > Data > Data Options, then select Edit Default Layout. In the PivotTable Options dialog, open the Data tab and uncheck Automatically refresh when the source data changes

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.