copy and pasting issue

chad1222

Board Regular
Joined
Jul 14, 2003
Messages
133
Ok here is the deal i have a sheet with a ton of refences that are linked to other sheets on the same workbook. When those refences get messed up by my users i would like to just recreate the data sheet with all the formulas by copying a backup sheet and pasting it it. But when i do this it copys all the refences based on the backupworkbook.
example
Cell A1 = "hostname" & sheet1!A5

after pasting the backup sheet ontop of the old one it comes out
Cell A1 = "hostname" &[backupworkbook!sheet1.xls]sheet1'!A5

how can i make it just paste in the EXACT formulas

thanks

Chad
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Hopefully this will help to set a principle :-

'----------------------------------------------------
Sub test()
Dim MySheet As Worksheet
Dim MyFormula As String
'--------------
Set MySheet = Worksheets("MySheet")
For r = 1 To 20
MyFormula = MySheet.Cells(r, 1).Formula
ActiveSheet.Cells(r, 1).Formula = MyFormula
Next
End Sub
'----------------------------------------------------
 

Watch MrExcel Video

Forum statistics

Threads
1,123,087
Messages
5,599,654
Members
414,325
Latest member
kfg1287

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
Top