Skip to main content

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

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

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...

Description


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!
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,

In the formula you provide (=OFFSET('dynamic pivot with table'!$A$1,0,0,COUNTA('dynamic pivot with table'!$A:$A),COUNTA('dynamic pivot with table'!$1:$1)), MUST we update this text (dynamic pivot with table) with the name of the new range we just created? I see that yours is called Salary, but the formula remains the same without updating the words 'dynamic pivot with table'. When I leave the formula as is, I receive this error:

Data source reference is not valid.

Please advise! Thank you!
This comment was minimized by the moderator on the site
Hi Silv,

In this formula, "dynamic pivot with table" is the name of the worksheet that contains the source data. You need to match this to your actual sheet name.
This comment was minimized by the moderator on the site
On "Create a dynamic Pivot Table by using the OFFSET function", I got up to step 5 (successfully created the named offset range), but when creating the Pivot Table, on selecting the range and using the name I assigned before, it returns an error "Data source is not valid". What am I doing wrong?
This comment was minimized by the moderator on the site
Hi Jose, I receive the same error and the names are the same. What else could we be doing wrong? I tried about 10 times for one of my tables (of many), and it didn't work either time. Thanks!
This comment was minimized by the moderator on the site
Hi Jose,

Make sure that the range name you specify in the Create Pivot Table dialog box is the same as the range name you specified in Step 3.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/pivot-table2.png
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations