do not delete "0"

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

A dialog box to change Columns 6
Instruct to start in Row 5 6
Include "00" 2
Paste Values REPOST 1
Active sheet problem / macro button 0
Remove a "0" 9
Reference is not valid 9
Adjusting height of text cells 3

Top