Change Data Source for Multiple Pivot Tables

  • Thread starter Thread starter WolfgangPD
  • Start date Start date
W

WolfgangPD

I have multiple pivot tables in one workbook and would like to change the
data source on all of the pivot tables. Is there a way to do this all at
once instead of selecting each table? The data is contained in another Excel
workbook. Thanks!
 
You can iterate through, and change, the source using the sourcedata property
for the pivottable.

sheet1.PivotTables(1).sourcedata
 
Back
Top