If you need to change the data source for a pivot table created based on data from the current file, follow these steps:
1.Place the cursor in the Data source box. The source table tab will open in the document and the value in the Data source box will be available for editing. The specified data range will be highlighted in the source table in color.
2.Edit the value in the Data source box by selecting the desired range on the sheet or entering the reference manually.
3.Click the
button or press Enter.

If you need to change the data source for a pivot table created from an external data source, follow these steps:
1.Hover your cursor over the name of the external source in the Data source box and click the
button. In the menu that opens, select Replace.

2.In the External data sources window, select another external source from the list or add a new one, and then click OK.