Updating Pivot Table Data Range in Excel
In this article
To update a PivotTable’s source range in Excel for Microsoft 365 on Windows, click inside the PivotTable, choose PivotTable Analyze > Change Data Source, enter or select the new range, and click OK. Then choose PivotTable Analyze > Refresh to recalculate the report. If the source is an Excel Table, add rows to that table and refresh instead; its range usually expands automatically.
What changing the data range does
A PivotTable summarizes records from a source, such as a worksheet range or Excel Table. Its source definition determines which rows and columns are available to the report. If new records fall outside a fixed source range, refreshing alone will not include them: refresh updates the PivotTable from its existing source, but does not necessarily enlarge that source.
For example, a PivotTable based on Sales!$A$1:$D$500 will not pick up a new sale in row 501 just because you click Refresh. Change the source to include the new row, or use a Table-based source that expands as records are added. Changing the source can also make newly added columns available as PivotTable fields.
Change a fixed worksheet range
- Check the source data. It should have one header row, one record per row, and no blank header cells. Avoid merged cells in the header, and keep unrelated notes or totals outside the data block.
- Click any cell in the PivotTable. The contextual PivotTable Analyze tab appears on the ribbon.
- Select PivotTable Analyze > Change Data Source. In the dialog, choose the worksheet range or type its reference, such as
Sales!$A$1:$D$650. - Click OK, then select PivotTable Analyze > Refresh. Check the results and confirm that expected fields and records appear.
You can select the source range directly in the dialog if the data is on another sheet. Make sure the range includes the header row as well as every intended data row and column. If the source is in another workbook, that workbook may need to be accessible for Excel to update the connection.
Use an Excel Table for data that grows
For a list that receives new records regularly, converting the source to an Excel Table is often more reliable than repeatedly editing a fixed range. Click in the source data and choose Insert > Table (or press Ctrl+T on Windows). Confirm that the range is correct and that My table has headers is selected.
When creating a PivotTable, select a cell in the Table and choose Insert > PivotTable. Excel uses the Table as the source. Later, typing or pasting records directly below it generally expands the Table; refresh the PivotTable to include those records. If the rows were pasted somewhere outside the Table, first resize or expand the Table, then refresh. A Table is especially useful for recurring imports, but it does not refresh the PivotTable automatically in every situation.
Refresh, change source, or refresh all?
These actions solve different problems. Refresh rereads the current source and updates the report. Change Data Source changes which cells or table provide the source. Refresh All, available under Data > Refresh All, updates multiple workbook connections and PivotTables, which is useful when a workbook has several reports or external data connections.
Use Refresh when the source already includes the latest records. Use Change Data Source when the range is fixed and has grown, or when you need to point the PivotTable to a different source. Refresh All can save time in a workbook with many connections, but it does not correct an incorrectly defined source range. For external connections, the result can also depend on connection availability and refresh settings.
Common problems and checks
- New rows do not appear: Confirm that the source range includes them, or that they are inside the source Table. Then refresh.
- A field is missing: Check that its column is inside the selected source and has a nonblank header. After changing the source, refresh and look in the PivotTable Fields pane.
- The source range looks right but records are absent: Look for blank rows or columns that split the data, and verify that the first row is the actual header row. Also check filters in the PivotTable, which may hide items without excluding them from the source.
- Excel reports that the PivotTable field name is not valid: The source may contain an empty header, a merged header cell, or an incorrectly selected first row. Correct the headers and set the source range again.
- Old items remain in a filter list: Cached PivotTable items may persist even when no longer present in the current source. In PivotTable Options, review the setting for retaining deleted items; clearing retained items can change what appears in filter lists. This is separate from adding new source rows.
- The report has strange totals: Check for subtotal or grand-total rows included in the source, duplicate records, numbers stored as text, and blank values. A PivotTable summarizes what its source contains; it does not automatically identify or correct data-quality problems.
Excel for Mac and Excel for the web
In Excel for Mac, click the PivotTable and use the contextual PivotTable analysis tab to find the source-change and refresh commands; ribbon labels or placement can vary slightly by release. The same core distinction applies: changing the source updates its boundaries, while refreshing recalculates from the source already assigned. On Mac, the Windows shortcut Ctrl+T is generally replaced by Command+T for creating a Table, though menu commands are available if the shortcut differs in a particular setup.
Excel for the web supports common PivotTable refresh and editing tasks, but some source-management options can vary with workbook type and current web features. If the command to change a source is unavailable, open the workbook in the desktop Excel app and use PivotTable Analyze > Change Data Source. Shared workbooks and external connections may also have limits on refresh or editing.
Frequently Asked Questions
Do I need to refresh after changing the data range?
Yes. After selecting the new source range, refresh the PivotTable so it reads and summarizes the updated source. Check that the expected rows and fields appear.
Why does Refresh not include the rows I just added?
Refresh uses the source already assigned to the PivotTable. If the new rows are beyond a fixed range, change the source range or include the rows in the source Excel Table, then refresh.
Can I update the source for more than one PivotTable at once?
Refresh All updates multiple PivotTables and connections, but it does not necessarily change their source definitions. If several PivotTables need a new range, update each source as needed, or consider building reports from a shared Excel Table or data model.
Will changing the source range delete my PivotTable layout?
Changing the source normally keeps the existing layout and formatting, provided the fields used by the layout remain available. If a source column is removed or renamed, its corresponding PivotTable field may no longer work as expected, so review the report after the change.
Should I use a named range or an Excel Table?
For most growing lists, an Excel Table is a straightforward choice because it expands as records are added directly below it. A named range can be useful for a deliberately controlled source, but it must be maintained so its definition covers the intended data.