Pivot Tables

How to Change a Pivot Table's Data Source

Point an Excel pivot table at a new or larger range, a table or a named range with Change Data Source, and avoid the field and refresh problems it can cause.

On this page
  1. When to change the source
  2. Change it
  3. Use a table so the source grows
  4. Named ranges
  5. Data on another sheet
  6. Data in another workbook
  7. After you change it

A pivot table reads its data from a source range. If that data moves, grows or is replaced, you can point the pivot table at the new source without rebuilding the report.

When to change the source

  • New rows were added below the original range.
  • The data moved to another sheet or into a new workbook.
  • You replaced the old list with a new export.
  • You want the report to cover only part of the list.

Change it

  1. Click any cell in the pivot table.
  2. Go to the PivotTable Analyze tab. In the Data group, choose Change Data Source.
  3. In the dialog, type the new range, such as Sheet1!A1:F500, or select it on the sheet.
  4. Click OK.
  5. Refresh the pivot table with Data, then Refresh All.

Use a table so the source grows

A fixed range such as A1:F500 misses any rows added below row 500. A table avoids that. Select the data, press Ctrl+T and confirm that the range has headers. The table gets a name, which you can see and change on the Table Design tab. Then enter that name in the Change Data Source box. When you add rows to the table, the pivot table reads them after a refresh.

Named ranges

A named range gives a block of cells a name, such as SalesData, which you can use as the source. A plain named range doesn’t grow by itself. Making one resize automatically takes extra formulas and is more fragile than a table. For the basic steps, see how to create named range in excel.

Data on another sheet

Select the range on the other sheet, and Excel fills in the sheet name for you. The reference then looks like Sales!A1:F200, with the sheet name followed by an exclamation mark. How sheet references work is explained in reference cell on another sheet in excel.

Data in another workbook

If the source is a different file, the pivot table depends on that file’s path and name. Moving or renaming the file breaks the link, and refreshes then fail. Keep the source in the same workbook where you can. The reasons links break are covered in why do links to other workbooks break in excel.

After you change it

Check the PivotTable Fields pane. If the new range renames a column, drops one, or puts a header in the wrong row, fields may disappear or show up blank. If Excel says the reference isn’t valid, the range you typed doesn’t describe the data, so check the start and end cells and make sure the first row holds the headings.

The complete guide to pivot tables

What Is a Pivot Table in Excel
Read the guide

Keep exploring

Guides from other topics

All topics →