Method 1 – Refresh a Pivot Table via the Context Menu
STEPS:
- Right-click on the table and select Refresh.
- We can see that the Nissan brand now has only one car on the list.
Method 2 – Enable Pivot Options to Refresh Automatically When Opening the File
STEPS:
- Select anywhere in the pivot table.
- Go to the PivotTable Analyze tab from the ribbon.
- From the Options drop-down menu, select Options.
- Alternatively, right-click on the table and select PivotTable Options.
- The PivotTable Options dialog box will appear.
- Go to the Data menu.
- Check Refresh data when opening the file.
- Click on the OK button.
- Here’s the result.
Method 3 – Refresh Pivot Data from the PivotTable Analyze Tab
STEPS:
- Go to the PivotTable Analyze tab on the ribbon.
- Click on the Refresh drop-down menu.
- Select Refresh.
- We can see the result.
If your worksheet has multiple pivot tables, you can refresh all of them by clicking on the Refresh All option.
Method 4 – VBA Code to Refresh Pivot table in Excel
STEPS:
- Right-click on the sheet name where the pivot table is located.
- Go to the View Code.
- Copy and paste the VBA code below.
VBA Code:
Private Sub Sheets()
Application.EnableEvents = False
Me.PivotTables(1).RefreshTable
Application.EnableEvents = True
End Sub
- To Run the code, press the F5 key or click the Run Sub button.
- This will refresh the pivot table.
Things to Remember
- You can also refresh a Pivot Table by pressing Alt + F5. It will refresh all the pivot tables on the spreadsheet.
Download the Practice Workbook