How to create a dynamic Pivot Table to auto refresh expanding data in Excel?
Normally, a Pivot Table can be refreshed with updated data in the source data range. But if you add new data to the source range, such as adding new rows or columns data to the bottom or right of the source range, the expanding data can’t be added into the Pivot Table even manually refresh the Pivot Table. How to refresh a Pivot Table with expanding data in Excel? The methods in this article can do you a favor.
Create a dynamic Pivot Table by converting the source range to a Table range
Create a dynamic Pivot Table by using the OFFSET formula
Create a dynamic Pivot Table by converting the source range to a Table range
Converting the source data to a table can help to refresh the Pivot Table with the expanding data in Excel. Please do as follows.
1. Select the data range and press the Ctrl + T keys at the same time. In the opening Create Table dialog, click the OK button.
2. Then the source data has been converted to a table range. Keep selecting the table range, click Insert > PivotTable.
3. In the Create PivotTable window, select where to place the PivotTable and click OK (In this case, I place the PivotTable in current worksheet).
4. In the PivotTable Fields pane, drag the fields to the corresponding areas.
5. Now if you add new data to the bottom or right of the source range, go to the PivotTable and right click it, and then click Refresh from the context menu.
Then you can see the PivotTable is refreshed with the expanding data as below screenshot shown.
Create a dynamic Pivot Table by using the OFFSET function
In this section, I will show you how to create a dynamic PivotTable with the help of the OFFSET function.
1. Select the source data range, click Formulas > Name Manager. See screenshot:
2. In the Name Manager window, click the New button to open the Edit Name dialog. In this dialog, you need to:
- Enter a name for the range in the Name box;
- Copy the below formula into the Refers to box;
=OFFSET('dynamic pivot with table'!$A$1,0,0,COUNTA('dynamic pivot with table'!$A:$A),COUNTA('dynamic pivot with table'!$1:$1)) - Click the OK button.
Note: In the formula, 'dynamic pivot with table' is the name of the worksheet that contains the source range; $A$1 is the first cell of the range; $A$A is the first column of the range; $1$1 is the first row of the range. Please change them based on your own source data range.
3. Then it returns to the Name Manager window, you can see the new created name range is displayed in the window, please close it.
4. Click Insert > PivotTable.
5. In the Create PivotTable window, enter the range name you specified in step 2, choose where to place the PivotTable, and then click the OK button.
6. In the PivotTable Fields pane, drag the fields to the corresponding areas.
7. After adding new data to the source range, the data in the Pivot Table will be updated by clicking the Refresh option.
Related articles
Count unique values in pivot table
By default, when we create a pivot table based on a range of data which contains some duplicate values, all the records will be counted as well, but, sometimes, we just want to count the unique values based on one column to get the right screenshot result. This article provides several methods to show you how to count the unique values in pivot table.
Make row labels on same line in pivot table
After creating a pivot table in Excel, you will see the row labels are listed in only one column. But, if you need to put the row labels on the same line to view the data more intuitively and clearly, how could you set the pivot table layout to your need in Excel? The methods in this article will do you a favor.
Hide zero value rows in pivot table
To hide the rows which contain zero values in pivot table may be a common need that users often encountered, after hiding the zero value rows, your pivot table will look like neatly and the data also will be suppressed. Please read the tutorial for methods.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!





