[email protected] wrote...
....
In cases where I actually want to __copy__ and paste, I
have resorted to a text copy-and-paste. This is unpleasant
because it must be done one cell at a time. Highlight one
cell and copy the text of the formula in the "fx" field.
Press Esc to deselect the cell, then highlight the new
location, then do paste.
If the formulas to be copied exactly were in a single area range,
easier to select that range, Edit > Replace = with |=, copy then paste
elsewhere, then select both copied and pasted ranges and Edit > Replace
|= with =. If that still too unpleasant, use a macro.
Sub foo()
Dim r As Range, ac As Variant
If Not TypeOf Selection Is Range Then Exit Sub
On Error Resume Next
Set r = Application.InputBox( _
Prompt:="Select paste range", _
Title:="Formula Copy", _
Type:=8 _
)
If Err.Number <> 0 Or r Is Nothing Then
Err.Clear
Exit Sub
ElseIf r.Cells.Count <> Selection.Cells.Count Then
Set r = r.Cells(1).Resize(Selection.Rows.Count,
Selection.Columns.Count)
End If
On Error GoTo CleanUp
ac = Application.Calculation
Application.Calculation = xlCalculationManual
Selection.Replace What:="=", Replacement:="|=", lookat:=xlPart
Selection.Copy Destination:=r
Union(Selection, r).Replace What:="|=", Replacement:="=",
lookat:=xlPart
CleanUp:
Application.Calculation = ac
End Sub