do not delete "0"

  • Thread starter Thread starter Steved
  • Start date Start date
S

Steved

Hello from Steved

Using the below it underlines and bolds red on the 4th digit however it
keeps deleting the "0" as an example "0542' it wil make it "542" and "0042"
will make it "42" please do I instruct the below to have "0542" or "0042"
please

Sub Test()
Dim myS As String
Dim myC As Range

For Each myC In Intersect(ActiveSheet.UsedRange, Range("E5:E500"))
myS = myC.Value
myC.NumberFormat = "@"
myC.Value = myS
With myC.Characters(Start:=4, Length:=1).Font
.FontStyle = "Bold"
.Underline = xlUnderlineStyleSingle
.COLOR = 255
End With
Next myC
End Sub

I Thankyou in Advance.
 
Back
Top