Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi!,
Can this be simplified...any help is appreciated. Sub Checking_the_Format() Range("A1:H1").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel Range("A2:H2").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel ' Done for 5 rows End Sub Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub Checking_the_Format()
For Each cel In Range("A1:H5") cel.Font.FontStyle = "Bold" Next cel End Sub -- --- HTH Bob (change the xxxx to gmail if mailing direct) "RK" wrote in message ups.com... Hi!, Can this be simplified...any help is appreciated. Sub Checking_the_Format() Range("A1:H1").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel Range("A2:H2").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel ' Done for 5 rows End Sub Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub Checking_the_Format()
Dim cel As Excel.Range For Each cel In Range("A1:H5").Cells cel.Font.Bold = True Next cel End Sub 'Even better... Sub Checking_the_Format_R1() Range("A1:H5").Font.Bold = True End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "RK" wrote in message Hi!, Can this be simplified...any help is appreciated. Sub Checking_the_Format() Range("A1:H1").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel Range("A2:H2").Select For Each cel In Selection If cel.Font.Bold = False Then cel.Font.FontStyle = "Bold" Next cel ' Done for 5 rows End Sub Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Highlight Range - wrong macro, please edit. | Excel Worksheet Functions | |||
Looping Macro That adds a blank row between different part #'s | Excel Discussion (Misc queries) | |||
macro to browse for workbook, pick up data and looping | Excel Worksheet Functions |