Change pivot source when generating new workbook

Darren_workforce

Board Regular
Joined
Oct 13, 2022
Messages
146
Office Version
  1. 365
Platform
  1. Windows
I have a file setup with macros to sort out and filter data that I paste in weekly from a few raw reports. After the transfer of data, the macro files "beautify" the data so it's more presentable to my superiors. I have a couple pivot tables that I just refresh and all is well. I run 1 final macro file that generates a brand new .xlsx files that carries over the majority of the macro file's tabs. This is how I avoid altering the macro file or end up sending a report that's bigger in size than it needs to be. My problem is that the pivot tables that carry over into the new worksheet, if anybody were to attempt to refresh them (even accidentally), are still referencing the source data located in the macro file located in the company's U drive. So if they were to accidentally be refreshed, it would pull data that could potentially be months old and overwrite the newest data within the weekly report I create.

What needs to happen so that when the new .xlsx file is created, the pivot tables reference the data contained within their own file instead of trying to reference data from the separate macro file?

Thank you in advance for any assistance available!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
When you carry over the PivotTables to the new workbook, move them and move their source tabs over, instead of copying, then they will point within the new workbook.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top