Text formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Want macro that will work on a range I select that will look at the contents,
if apostrophe at beginning then no action, if not, it will add so cell
contents are formatted text.
THX
 
Scottie,
This should be a start:

Sub Sub1()
Dim s1$, zCell As Range
For Each zCell In Selection
If zCell.PrefixCharacter <> "'" Then
s1 = zCell.Value
zCell.Value = "'" & s1
End If
Next zCell
End Sub ' D-C Dave
 
Back
Top