30 Advanced Excel Tips for 2026

Excel Champs / Pivot Table / How to Change the Data Source for Pivot Table in Excel (Range)
By Puneet Gogia (Microsoft MVP)

How to Change the Data Source for Pivot Table in Excel (Range)

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

Click any cell in the pivot table, go to PivotTable Analyze → Change Data Source, select the new range in the Table/Range box, such as Sheet1!$A$1:$F$13, and click OK. In older versions the tab is called Analyze or Options. The same box shows the current source, so it is also how you find where a pivot’s data lives.

To stop editing the range every time you add rows, click inside the data and press Ctrl + T to turn it into a Table. Then open Change Data Source again and type the table name, such as Table1, in place of the range. You can check the name in Table Design → Table Name.

From then on, new rows and columns in the Table are picked up when you refresh. Right-click any cell in the pivot table and choose Refresh, or use Data → Refresh All to update every pivot in the workbook.

Keep the column headers the same in the new range. If a header has been renamed or a column removed, any field built on it drops out of the pivot, and you have to add it back from the field list.

If Excel says the PivotTable field name is not valid, one of the columns in the new range has a blank header. Give every column a heading, or tighten the range so it leaves out empty columns.

In this post, we will discuss changing or locating the data source for a given Pivot Table. This is extremely helpful when your data constantly changes.

What is the Source Data in Pivot Tables?

Source data in a Pivot Table is the original data that you want to analyze and summarize using the Pivot Table. This could be anything from sales data, performance ratings, survey results, or other types of information that you have collected and organized in Excel. The source data could be a range of cells within an Excel worksheet, a named range, an Excel table, or data imported from an external source using Power Query.

Steps to Change Data Source in Pivot Table

  1. To start, click on a cell of the pivot table, or you can also select the entire pivot. This will activate the "Analyze" or "PivotTable Analyze" tab on the ribbon. go-to-analyze-tab
  2. After that, in the Data group, there is a drop-down list named "Change Data Source." Click Change Data Source to open the dialog box.
    change-data-source-option
  3. In the "Change PivotTable Data Source" dialog box, you will be able to select a new data source for your Pivot Table. This could be another range of cells in your current worksheet, or a different worksheet altogether. Type the new range or select it with the mouse.
    change-pivot-table-data-source
  4. Here in this example, the current data source for the PivotTable is Sheet1!$A$1:$F$8 which means that rows 9 to 13 are not included in the PivotTable.
  5. Now either select the complete data i.e. Sheet1!$A$1:$F$13 or use the table name to update your PivotTable data source. In the end, click OK to update the data source.

Keyboard Shortcut to Change Data Source in a Pivot Table

There’s no direct keyboard shortcut to change the pivot table data source.

However, you can use the shortcut below to open the data source dialog box and then change the reference from there.

You can use the shortcut key Alt ⇢ J ⇢ T ⇢ I ⇢ D (press the keys one after the other).

You can use the following steps:

  • Click anywhere inside the Pivot Table to bring up the PivotTable Analyze tab. Press Alt, J, T, I, D on your keyboard. This will open the “Change PivotTable Data Source” dialog box. (Alt, J, T, R, R refreshes the pivot table instead.)
  • Now, you can select a new data source for your Pivot Table. Type the new range or table name, or use the arrow keys with Shift to select the range.
  • Press Enter to confirm your selection. The data within your Pivot Table will be updated to reflect the new data source.

Change to a Dynamic Data Source

By doing this, there will be no need to update your source data again and again. Just refreshing the Pivot Table will update the data range.

Change Data Source to Table
changing source data to an table
  1. Convert your data range into a Table by selecting your data and then choosing the “Table” option from the “Insert” tab on the ribbon (or press Ctrl + T).
  2. Once your data is converted into a Table, any changes you make to your data (like adding new rows or columns) will automatically be included in the Table range.
  3. You can now use this Table as the data source for your Pivot Table. When you create your Pivot Table, select the Table you just created instead of choosing a static range as source data.
  4. Now, whenever you add, remove, or change data in your Table, you can refresh your Pivot Table to update it with the new data. There is no need to manually adjust the data source each time your data changes.
  5. To refresh the PivotTable, select any cell in the PivotTable, go to “Analyze” (PivotTable Analyze) on the ribbon, and select “Refresh,” or press Alt + F5.

Note: This method requires that your original source data is set up in a way that can be converted into an Excel Table. This means that your data should have a clear header row and consistent data types in each column.

This method also helps you change the data source to a different Excel file (new data). All you need to do is convert the data in that file into an Excel table and then change the data source from the dialog box.

Change the Data Source with VBA

If you change the source of a pivot table often, you can do it with a short macro. The following code points the first pivot table on the active sheet to an Excel table named “Table1” (change both names to match your file):

Sub change_pivot_source()
Dim pt As PivotTable
Set pt = ActiveSheet.PivotTables(1)
pt.ChangePivotCache ThisWorkbook.PivotCaches.Create( _
SourceType:=xlDatabase, SourceData:="Table1")
pt.RefreshTable
End Sub

Frequently Asked Questions

Why do I get “The PivotTable field name is not valid”?

The new source range has a column without a header, or you selected a range that doesn’t start at the header row. Make sure every column in the source has a name in the first row.

How do I see the current data source?

Open Change Data Source. The Table/Range box shows the current source, and Excel also marks it on the sheet with a moving border. Press Esc if you only wanted to check it.

Why is Change Data Source different for my pivot table?

If the pivot table is built on the Data Model or an external connection, you don’t pick a range. You change the query or connection instead (Data ➜ Queries & Connections, or Power Pivot ➜ Manage for Data Model tables).