Duplicate a spreadsheet to another workbook with modifying its formulas or the charts datasources

XavierL

New Member
Joined
Feb 25, 2019
Messages
1
Hey all,

I am trying to duplicate a spreadsheet from a workbook to another, withoutchanging the formulas or the datasources of the charts it contains. The trickis that the worksheet I want to duplicate has (tons of) formulas and graphsthat use data from other worksheets. If I use the duplicate function the formulasand the charts will source its data from the original workbook




(Simplified) example:



I have a workbook A with two sheets:


  • X with cell C1 = [Y]D2
  • Y


I want to duplicate X in the workbook B so that X’ cell C1= [Y]D2, not = [workbook A][Y]D2.

Whether I do it from the excel interface or by using thevba copy/paste functions, the new worksheet will source its data from theprevious workbook.

For the formulas, I can use the ‘replace all’ function toremove all the [workbook A] the sheetcontains (dirty but it does the work) but I can’t find a way do it for the datasources of the charts.

Any idea ?


 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
You can copy the sheets and then on the Data tab of the Ribbon click 'Edit Links' and remove the links. Or you can do a SaveAs to a new name for the workbook (The old one will still be there) and then delete any data not generated by formulas and, if needed, delete sheets that you don't want. Both methods leave sheet with formulas intact without the links to the original workbook. But if you had external references in the old workbook, ie. references to ranges in otherworkbooks, as part of your formulas, you might lose them with the removal of links.
 
Upvote 0

Forum statistics

Threads
1,215,035
Messages
6,122,785
Members
449,095
Latest member
m_smith_solihull

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