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
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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
'----------------------------------------------------
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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