How to paste formula to new workbook without linking

mikeyboy

Board Regular
Joined
Apr 26, 2002
Messages
57
Often one of my array formula's gets deleted from a sheet. If I copy and paste from a backup xls file links are created in the pasted formula. All I want is the exact same formula. How can I do it?

Thanks in advance
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi mikeyboy

Haven't tested this, but should work. Just change names and cells to suite

Code:
Sub DoIt()
Sheet1.Range("A1").FormulaArray = _
Workbooks("Book2.xls").Sheets(1).Range("A1").FormulaArray

End Sub

Another non VBA method is to copy the formula from the Formula bar, select the destination cell, then paste into the formula bar.

You may also find this link of use:
http://www.ozgrid.com/Excel/TipsAndTricks.htm

Scroll down to:
"How to copy formulas without the reference changing"

_________________
Regards
Dave Hawley
Xl Add-ins, with free File Size Reducer
40+ more here
Xl Training
This message was edited by Dave Hawley on 2002-07-23 04:10
 
Upvote 0
Have you tried highlighting the formula in the Formula Bar, hit Ctrl + C, activate the cell you want to paste into ( ie double click in it ), hit Ctrl + V.

This should copy the array formala as text, rahter than a formula, thus preventing links being created back to the backup file.

Iain
 
Upvote 0
Have you tried highlighting the formula in the Formula Bar, hit Ctrl + C, activate the cell you want to paste into ( ie double click in it ), hit Ctrl + V.

This should copy the array formala as text, rahter than a formula, thus preventing links being created back to the backup file.

Iain
 
Upvote 0
Yet another option is to change the cell you want copied to text by putting a ' at the start of the formula. Then copy, paste and edit your destination cell to remove the ' and change format back to number.

You will have to go back and undo your change in your original spreadsheet or simply close it without saving.
 
Upvote 0
If you want a non-VBA method to accomplish this with many cells simultaneously, first copy all your cells with a simple copy and paste. Bring up the "find and replace" dialogue. Enter the link portion of the formula in to the "find" field and make sure there is nothing in the "replace" field. Click "replace all". You should be left with just the original formula in all the fields.
 
Upvote 0
If you want a non-VBA method to accomplish this with many cells simultaneously, first copy all your cells with a simple copy and paste. Bring up the "find and replace" dialogue. Enter the link portion of the formula in to the "find" field and make sure there is nothing in the "replace" field. Click "replace all". You should be left with just the original formula in all the fields.

Thanks a lot, simplest methods always best :) Now, a bigger challenge - how do I do the same trick, but with ca 900 files, at the same time? Is there a simple VBA macro to do it? Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,020
Members
448,543
Latest member
MartinLarkin

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