Changing Data Source - Is there an easier way?

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
I have multiple workbooks all identical but contain data for individual sites.

I have recently introduced a new worksheet which I created on one of the workbooks and I wanted to copy it and paste it in to a new blank worksheet for each sites own document but when I do this it also copies in the link for the originating workbook as part of the formula's set out, which I then have to go through and delete it for each cell which is very time consuming.

Surely there must be an alternative way that is more efficient? Can any one help me out?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi

Try editing the links, change source to the current workbook.
 
Last edited:
Upvote 0
several ways to do it - depending which works best for you:
1. open New Formulas sheet in Formula view -> copy -> paste in Notepad -> copy from Notepad > Paste in new excel sheet (not universal)
2. Copy->Paste-> Use Replace (Ctrl+H) to remove ext.ref. from formulas
3. Copy->Paste-> Go to Data Tab > Edit links ...
4. Open the two workbooks, select the area to transfer the formulas to, then in the immediate window of VBE editor (Alt+F11 then press Ctrl+G) type and press emter:
Code:
selection.formula=Workbooks("book1.xlsx").Worksheets("Sheet1").range("A1:D26").formula
You have to adapt the parts in the quotes to match your file/sheet/range - once set the same can be used for all other files.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

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