I have written the following vba which allows me to run a find and replace on selected cells only. It replaces the = sign in a formula with a 1= so I can easily copy over formulas from workbook to workbook or even in different instances of Excel. It is working for the most part but, I cant figure out why when it finds and replaces, it is replacing with 1111= instead of 1=. Any ideas? Thank you.
VBA Code:
Sub FindReplace_Equals_With_1Equals()
Dim rngMyRange As Range
Dim cell As Range
Set rngMyRange = Selection
For Each cell In rngMyRange.Cells
Selection.Replace What:="=", Replacement:="1=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Next cell
End Sub