Change pivot source when generating new workbook

Darren_workforce

Board Regular
Joined
Oct 13, 2022
Messages
128
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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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