ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   change font size and bold in cell? (https://www.excelbanter.com/excel-programming/290122-change-font-size-bold-cell.html)

R Doornbosch

change font size and bold in cell?
 
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?



Don Guillett[_4_]

change font size and bold in cell?
 
Sub setfont()
With ActiveCell
..Font.Size = 12
..font.bold=true
..Offset(1).Font.Size = 10
..Offset(2).Font.Size = 16

End With
End Sub
--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?





R Doornbosch

change font size and bold in cell?
 
I can change the font and make it BOLD but the keyword Offset doesn't seem
to do anything.



"Don Guillett" wrote in message
...
Sub setfont()
With ActiveCell
.Font.Size = 12
.font.bold=true
.Offset(1).Font.Size = 10
.Offset(2).Font.Size = 16

End With
End Sub
--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?







Don Guillett[_4_]

change font size and bold in cell?
 
If you have
A
B
C
and place your cursor on A, it will do font size to
A=12
B=10
C=16

I thought that is what you wanted.???
Offset means down 1. If it was offset(1,2) would be down 1 and to the right
2.

--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
I can change the font and make it BOLD but the keyword Offset doesn't seem
to do anything.



"Don Guillett" wrote in message
...
Sub setfont()
With ActiveCell
.Font.Size = 12
.font.bold=true
.Offset(1).Font.Size = 10
.Offset(2).Font.Size = 16

End With
End Sub
--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?









R Doornbosch

change font size and bold in cell?
 
Cell A1 = the text below, when I use
Offset(1) .font = 20 the text remains at font 12, I'd like the school
name to be font 16 and the teacher name to be font 14 THANKS


A.A. PUBLIC SCHOOL
Chatham-Kent

Teacher Name
3 - Alternating full day, starting Monday



Don Guillett[_4_]

change font size and bold in cell?
 
it's font.SIZE as shown in my macro

--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
Cell A1 = the text below, when I use
Offset(1) .font = 20 the text remains at font 12, I'd like the

school
name to be font 16 and the teacher name to be font 14 THANKS


A.A. PUBLIC SCHOOL
Chatham-Kent

Teacher Name
3 - Alternating full day, starting Monday





R Doornbosch

change font size and bold in cell?
 
Sorry, I did use Font.Size and it still doesn't affect the text. I cut and
past your code perfectly, every other line in your code works except the
Offset command.



Gord Dibben

change font size and bold in cell?
 
The code Don gave you does not change font sizes within a cell, rather it
changes fonts in 3 contiguous cells in a column.

Gord Dibben Excel MVP

On Mon, 9 Feb 2004 15:39:32 -0500, "R Doornbosch"
wrote:

Sorry, I did use Font.Size and it still doesn't affect the text. I cut and
past your code perfectly, every other line in your code works except the
Offset command.




All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com