I have a macro that's not doing all it's supposed to be doing.
What it's supposed to do is remove all leading apostrophes.
What it's doing is removing leading apostrophes from numbers, so '507 becomes 507, what I want.
What it's NOT doing is removing leading apostrophes from text, so 'Doc becomes Doc, which I also want.
What do I have wrong?
Sub ApostropheKiller()
'Kills leading apostrophes
Dim s As Range
If MsgBox("Want to remove all leading apostrophes from your selection?", _
vbOKCancel + vbQuestion, "Are you sure you?") = vbCancel Then Exit Sub
For Each s In Selection
s.Value = Replace(s.Value, "'", "")
Next s
End Sub
Bookmarks