Jan 18 2021 08:15 PM
I have workbook with sheet Rev-0. This sheet contains a table (cols A-G) and a pivot table (col. J) accessing the table in cols A-G. The table is named (Rev_0).
I's possible that a copy needs to be made of this sheet (new sheet called Rev-1) using the standard right-click | Move or Copy command. This creates the Rev-1 as expected. However when I check the data source for the pivot table in sheet Rev-1 the data source still points to Rev-0 where I need it to access the table in Rev-1. The table in Rev-1 has a new name as a result of the copy function.
While I can easily change the data source, I create this for a client where this kind of modification is too much to ask. Is there a way to make the pivot table data source follow the sheet; i.e. pivot table in sheet Rev-1 accesses the table in Rev-1?
Jan 18 2021 09:08 PM
Change default setting of Pvt by uncheck "source data with file" from then while moving the sheet pvt will pick new sheet data source. @tfmeier
Jan 19 2021 02:44 PM
Ok, this is what I've done:
I'm using the latest version of Excel
Jul 28 2021 03:16 PM
Apr 16 2024 09:55 PM
This seems to have never been resolved here. My issue is even slightly weirder. In my original sheet, I gave the source data range a new name. Now, when I copy that sheet the PT on the new sheet refers to the OLD name of the data range on the original sheet! Blows my mind how this all gets retained in the background. I am trying to refresh caches, etc, but have not found a solution yet. Any thoughts out there?
Apr 22 2024 03:35 AM
Best to ignore my previous contribution; turns out the source table of the pivot table had been "hard coded" in VBA. Was easily fixed in the end. I'd be happy to provide the related VBA code on request.