For example i have two cells
A1: =1/2
A2: /abc
I want to replace /
char in second cell with something else without changing first cell which contains formula. Final result should be like this
A1: = 1/2
A2: #abc
Select your cells and run:
Sub dural()
Dim r As Range
For Each r In Selection
If Not r.HasFormula Then
r = Replace(r.Text, "/", "#")
End If
Next r
End Sub