I have a workbook which fires off a series of macros, but I just realized that my Pivot Tables don't update properly as the source worksheet/tab is constantly changing in terms of number of rows that need to be referenced.
So basically, the source sheet named: "S_Detail" can vary in terms of rows (can go up or down), but will always have the same number of columns
The sheet with the Pivot Tables, "PT_Count" contains 3 pivot tables that all need to reference the entirety of the "S_Detail" sheet.
Rather than clicking on each of the 3 pivot tables in "PT_Count", going to Options > Change Data Source > and changing my range (with respect to number of rows in the "S_Detail" sheet), how would I do this through VBA to capture an ever-moving dynamic range in "S_Detail"?
By the way, the 3 pivot tables in "PT_Count" are:
PivotTable3
PivotTable5
PivotTable6
I've tried a few different methods, but I'm coming up with errors.
Any help would be greatly appreciated!
Bookmarks