Pages

3 May 2012

Bold/Color

Make bold and change the color of the first 5 characters of text in a cell.

Sub FiveChrBoldColor()
Dim mycell As Range
For Each mycell In Selection.Cells
mycell.Characters(Start:=1, Length:=5).Font.FontStyle = "Bold"
mycell.Characters(Start:=1, Length:=5).Font.Color = -16776961
Next
End Sub

No comments:

Post a Comment