Refreshing a pivot table means updating the pivot table with the data from its source, this can be done by three methods, one is the most popular one which is clicking on the pivot table and press ALT + F5 which will refresh out pivot table or we can go to the Data tab and click on refresh from the connections section, another most used way is we right-click on the pivot table and click refresh.
Refresh Pivot Table in Excel (Table of Contents)
- How to Refresh Pivot Table in Excel?
How to Refresh Pivot Table in Excel?
There are multiple ways to refresh the pivot table in excel.
To analyze data, summarise data we apply pivot tables. If there is any additional or deletion in the main data pivot table will not recognize the changes automatically. We need to refresh all the pivot tables to update the pivot to the new database.
Assume you have 10 pivot tables and refreshing each one of the pivot tables manually takes hell lot of time. I will explain you the ways of the refreshing pivot table and make the report real-time and reliable.
Here are the top 4 methods to refresh Pivot Table in Excel
#1 – Changing the Data Source Refresh Pivot Table
Step 1: I have sales data from different countries.
Step 2: Let me apply the pivot table to this data.
Step 3: Now I am going back to my pivot table data and adding a few more data to the table.
I have added five lines of the data. If I go and see the table, it is not showing the updated values.
Let me audit what is the range of the pivot table data.
Step 4: Select the pivot table and go to Options and Change Data Source.
Step 5: Once you click on Change Data Source this will take you to the data sheet along with the below box.
Look at the range it has. It has the data range from A1 to B23, whereas my data is there from A1 to B28.
Step 6: In the same dialogue box, change the source data from A1 to B23 to A1 to B28.
Step 7: Now click on OK it will add the new data to the pivot table and refresh it.
#2 – Right Click on Pivot Table and Refresh Pivot Table Excel
I am taking the previous data as an example. Here I am not adding any amount of data to the list rather I am just changing the existing numbers.
Here on cell B10, I have to change the value from 677434 to 750000.
If I go to the pivot table still it is showing the old values for the country France.
The new value for the country France supposed to be 1638228 but it is showing the old value only.
We need to do one simple thing here.
Right click on the Refresh Pivot Table.
Click on the Refresh button to update the new values.
Okay, now our Pivot Table is showing updated values.
Now the question is if I have 10-pivot tables can I update each one of them going to each pivot table and update.
We have the shortcut to refresh all the pivot tables in excel one single shot. Below is the shortcut key to refresh all the pivot tables once.
We can find this option under the Data tab.
#3 – Using Auto Refresh Pivot Table Excel VBA Code.
Ok, we know how to refresh pivot table to new values. Whenever we change the values we every time we need to update manually.
If the data changes frequently and updating each and every pivot table is not that easy. We are humans and we tend to forget at times.
To come of that danger we have a VBA code, which can update or refresh the pivot table in excel as soon as there are any changes.
Follow this section of the article to learn the VBA code that refreshes the pivot table in excel automatically.
Step 1: Go to the Developer tab and click on Visual Basic.
Step 2: Click on Visual Basic. Go to This Workbook and double click on that.
Step 3: From the dropdown list select Workbook.
Step 4: Once you have selected the workbook it will automatically create one macro for you. Ignore that.
Step 5: From the Right-hand side drop down select Sheet Change. It will insert one more macro for you.
Step 6: Now copy and paste the below code the macro that has created for the second time.
What this code will do is if there is any change in the sheet it will refresh the pivot table in excel automatically for you.
Note: Once you copy and paste the code, you have to save the workbook as Macro-Enabled Workbook.
#4 – Refresh Pivot Table When you Open the Workbook
We can refresh the pivot table in excel while opening the workbook.
Right Click on any of the pivot table and select Pivot Table in Excel option
Click on this option
Go to Data and check Refresh Data when opening the file.
This will refresh the pivot table in excel whenever you open the excel file.
Things to Remember
- You can choose any of the above methods to refresh your pivot tables.
- In case of VBA code you, need to save your workbook as the macro-enabled workbook.
- The easiest for me to refresh is the shortcut ALT + A + R +A
- You can rename your pivot table under pivot options.
- In VBA code, you need to mention each of the pivot table names in case of multiple pivot tables.
This has been a guide to Refresh Pivot Table in Excel. Here we discuss how to Refresh Pivot Table using top 4 methods in excel along with practical examples and a downloadable template. You may learn more about excel from the following articles –
- Pivot Table From Multiple Sheets in Excel
- Pivot Table Slicer
- Filter in a Pivot Table
- Developer Tab in Excel (Using VBA Programs)
- Starting an Excel Pivot Table
- Pivot Table Calculated Field and Formula
- How to Randomize List in Excel?
- Methods of Using Save as Shortcut in Excel?
- How to Delete Pivot Table?
- Auto Format Excel
- Random Numbers in Excel
- Combine Cells in Excel
- Standard Deviation in Excel