moving worksheets containing formulas to a new workbook

Nelboy

Board Regular
Joined
Mar 28, 2014
Messages
53
Office Version
  1. 365
Platform
  1. Windows
Dear all,

Before I start trying to reinvent the wheel.

within my code I am creating a workbook of worksheets pulled from other workbooks. The problem is that I have one worksheet which has formulas in it that I want to use in the new workbook to pull data.

original formula
Code:
=IFERROR(ROUNDDOWN('Total to be invested'!$H4*(INDIRECT("'"&C$1&"'!O10")/'Total to be invested'!$E4),0),"")

when the worksheet in moved into the new workbook
Code:
=IFERROR(ROUNDDOWN('[Template Sheet.xlsm]Total to be invested'!$H4*(INDIRECT("'"&C$1&"'!O10")/'[Template Sheet.xlsm]Total to be invested'!$E4),0),"")

is there a way in VBA or excel in general when moving the sheet into the new workbook to stop the formula being update and reference the sheet named 'Total to be invested' in the new workbook rather than the original sheet

thanks in advance
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
There's a quick fix that I use once the sheet has been copied. Select the whole sheet and use find and replace:

Find: [Template Sheet.xlsm]

Replace: (i.e.nothing)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

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