After you create a PivotTable, you can change the range of its source data. For example, you can expand the source data to include more rows of data. However, if the source data has been changed substantially—such as having more or fewer columns, consider creating a new PivotTable.
You can change the data source of a PivotTable to a different Excel table or a cell range or change to a different external data source.
-
Select the PivotTable report.
-
On the Analyze tab, in the Data group, select Change Data Source, and then select Change Data Source.
The Change PivotTable Data Source dialog box is displayed.
-
Do one of the following:
To use a different connection-
Select Use an external data source, and then select Choose Connection.
The Existing Connections dialog box is displayed.
-
In the Show drop-down list at the top of the dialog box, select the category of connections for which you want to choose a connection or select All Existing Connections (which is the default).
-
Select a connection from the Select a Connection list box, and then select Open. What if your connection is not listed?
Note: If you choose a connection from the Connections in this Workbook category, you will be reusing or sharing an existing connection. If you choose a connection from the Connection files on the network or Connection files on this computer category, the connection file is copied into the workbook as a new workbook connection, and then used as the new connection for the PivotTable report.
For more information, see Manage connections to data in a workbook.
-
Select OK.
To change the data source of a PivotTable to a different Excel table or a cell range
-
Click Select a table or range and then enter the first cell in the Table/Range text box and select OK.
-
If your connection is not listed in the Existing Connections dialog box, select Browse for More, and then look for the data source you want to connect to in the Select Data Source dialog box. Select New Source if appropriate, and follow the steps in the Data Connection Wizard, and then return to the Select Data Source dialog box.
If your PivotTable is based on a connection to a range or table in the Data Model, you can choose another Data Model table or connection on the Tables tab. However, if your PivotTable is based on the Workbook Data Model, you can’t change the data source.
-
Pick the connection you want and select Open.
-
Select Only Create Connection.
-
Select Properties, and select the Definition tab.
-
If your .odc connection file has been moved, browse to its new location in the Connection file box.
-
If you need to change values in the Connection string box, contact your database administrator.
-
Select the PivotTable report.
-
On the Options tab, in the Data group, select Change Data Source, and then select Change Data Source.
The Change PivotTable Data source dialog box is displayed.
-
Do one of the following:
-
To use a different Excel table or cell range, click Select a table or range, and then enter the first cell in the Table/Range text box.
Alternatively, select Collapse Dialog to temporarily hide the dialog box, select the beginning cell on the worksheet, and then press Expand Dialog .
-
-
To use a different connection, select Use an external data source, and then select Choose Connection.
The Existing Connections dialog box is displayed.
-
In the Show drop-down list at the top of the dialog box, select the category of connections for which you want to choose a connection or select All Existing Connections (which is the default).
-
Select a connection from the Select a Connection list box, and then select Open.
Note: If you choose a connection from the Connections in this Workbook category, you will be reusing or sharing an existing connection. If you choose a connection from the Connection files on the network or Connection files on this computer category, the connection file is copied into the workbook as a new workbook connection, and then used as the new connection for the PivotTable report.
For more information, see Manage connections to data in a workbook.
-
Select OK.
If your connection is not listed in the Existing Connections dialog box, select Browse for More, and then look for the data source you want to connect to in the Select Data Source dialog box. Select New Source if appropriate, and follow the steps in the Data Connection Wizard, and then return to the Select Data Source dialog box.
If your PivotTable is based on a connection to a range or table in the Data Model, you can choose another Data Model table or connection on the Tables tab. However, if your PivotTable is based on the Workbook Data Model, you can’t change the data source.
-
Pick the connection you want, and select Open.
-
Select Only Create Connection.
-
Select Properties, and select the Definition tab.
-
If your .odc connection file has been moved, browse to its new location in the Connection file box.
-
If you need to change values in the Connection string box, contact your database administrator.
For more information about what data sources are supported, see Import and shape data in Excel for Mac (Power Query).
-
Select the PivotTable report.
-
On the Analyze tab, in the Data group, select Change Data Source, and then select Change Data Source.
The Change PivotTable Data Source dialog box is displayed.
-
Do one of the following:
-
To change the data source of a PivotTable to a different Excel table or a cell range, click Select a table or range, and then enter the first cell in the Table/Range text box, and select OK
-
To use a different connection, do the following:
-
Select Use an external data source, and then select Choose Connection.
The Existing Connections dialog box is displayed.
-
In the Show drop-down list at the top of the dialog box, select the category of connections for which you want to choose a connection or select All Existing Connections (which is the default).
-
Select a connection from the Select a Connection list box, and then select Open. What if your connection is not listed?
Note: If you choose a connection from the Connections in this Workbook category, you will be reusing or sharing an existing connection. If you choose a connection from the Connection files on the network or Connection files on this computer category, the connection file is copied into the workbook as a new workbook connection, and then used as the new connection for the PivotTable report.
For more information, see Manage connections to data in a workbook.
-
Select OK.
-
-
If your connection is not listed in the Existing Connections dialog box, select Browse for More, and then look for the data source you want to connect to in the Select Data Source dialog box. Select New Source if appropriate, and follow the steps in the Data Connection Wizard, and then return to the Select Data Source dialog box.
If your PivotTable is based on a connection to a range or table in the Data Model, you can choose another Data Model table or connection on the Tables tab. However, if your PivotTable is based on the Workbook Data Model, you can’t change the data source.
-
Pick the connection you want, and select Open.
-
Select Only Create Connection.
-
Select Properties, and select the Definition tab.
-
If your .odc connection file has been moved, browse to its new location in the Connection file box.
-
If you need to change values in the Connection string box, contact your database administrator.
-
Tap anywhere in the PivotTable to show the PivotTable tab on the ribbon.
-
Tap Change Data Source to display the change data source side pane.
-
Do one of the following:
-
Type in the desired Table/Range in the Source box.
-
Tap on the Source box, and then select the desired Table/Range on the grid.
-
-
Tap Apply.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.
See Also
Create a PivotTable with an external data source