ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   fonts for if...then statements (https://www.excelbanter.com/excel-programming/376318-fonts-if-then-statements.html)

Jimmy

fonts for if...then statements
 
Hello, and thanks in advance for you help:

Without itterating through each cell, is there a way to format the
cells in one column containing numerics , and leave the non-numerics
as is?

Selection.font.Italic = True
Selection.font.Name = "Century Gothic"

Thanks,
Jimmy


Ron de Bruin

fonts for if...then statements
 
Hi Jimmy

Try this for column C

Sub test()
On Error Resume Next
With Columns("C").SpecialCells(xlCellTypeConstants, xlNumbers)
.Font.Italic = True
.Font.Name = "Century Gothic"
End With
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jimmy" wrote in message ups.com...
Hello, and thanks in advance for you help:

Without itterating through each cell, is there a way to format the
cells in one column containing numerics , and leave the non-numerics
as is?

Selection.font.Italic = True
Selection.font.Name = "Century Gothic"

Thanks,
Jimmy




Jimmy

fonts for if...then statements
 
Hello, Ron:
It works!!!
Thanks a lot.
Jimmy




Ron de Bruin wrote:
Hi Jimmy

Try this for column C

Sub test()
On Error Resume Next
With Columns("C").SpecialCells(xlCellTypeConstants, xlNumbers)
.Font.Italic = True
.Font.Name = "Century Gothic"
End With
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jimmy" wrote in message ups.com...
Hello, and thanks in advance for you help:

Without itterating through each cell, is there a way to format the
cells in one column containing numerics , and leave the non-numerics
as is?

Selection.font.Italic = True
Selection.font.Name = "Century Gothic"

Thanks,
Jimmy




All times are GMT +1. The time now is 03:56 PM.

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