Dave Patton
Well-known Member
- Joined
- Feb 15, 2002
- Messages
- 6,358
- Office Version
- 365
- 2010
- Platform
- Windows
Excel 97 Win98
How can I format the entire range named “Cal”?
The range is now is B3:H75
I want the first line the default format (bold and font.size=13) and the second line
(regular and font size=12)
The following will format one cell<pre>Sub Macro1()
With ActiveCell.Characters(Start:=1, Length:=12).Font
.FontStyle = "Bold"
.Size = 13
End With
With ActiveCell.Characters(Start:=13, Length:=18).Font
.FontStyle = "Regular"
.Size = 12
End With
End Sub</pre>
Some cells have just 12 characters of text and the default is OK.
Other cells contain more than 12. The first 12 s/b unchanged and other say from 13
with Regular and font=12.
This message was edited by Dave Patton on 2002-11-17 20:37
How can I format the entire range named “Cal”?
The range is now is B3:H75
I want the first line the default format (bold and font.size=13) and the second line
(regular and font size=12)
The following will format one cell<pre>Sub Macro1()
With ActiveCell.Characters(Start:=1, Length:=12).Font
.FontStyle = "Bold"
.Size = 13
End With
With ActiveCell.Characters(Start:=13, Length:=18).Font
.FontStyle = "Regular"
.Size = 12
End With
End Sub</pre>
Some cells have just 12 characters of text and the default is OK.
Other cells contain more than 12. The first 12 s/b unchanged and other say from 13
with Regular and font=12.
This message was edited by Dave Patton on 2002-11-17 20:37