Change Data Source for Multiple Pivot Tables

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!
 
G

galimi

You can iterate through, and change, the source using the sourcedata property
for the pivottable.

sheet1.PivotTables(1).sourcedata
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top