Automate Change Data Source

I have a macro that updates a worksheet containing data.  This changes the range established for a pivot table in another worksheet.  I want my macro to make the adjustment to the new range and refresh the pivot table.  This is probably an easy thing to do, but I am crunched for time and have many other pieces of the process to work.

Thanks!

Regards,

David Langschied

August 11th, 2015 9:46am

The easiest way to adjust the data source of a pivot table is to use a dynamic named range. See Excel Pivot Table -- Dynamic Data Source.

When you have done that, you only need to refresh the pivot table, using code such as

Worksheets("Sheet2").PivotTables("PivotTable3").Update

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2015 11:03am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics