Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional Formatting in a For Each Worksheet Loop
I currently have 1 conditional format on all worksheets. I want to add a 2nd
conditional format to all worksheets. This loop does not seem to work. Does anyone have any ideas why? Sub CFormat () Dim wks As Worksheet For Each wks in Worksheets 'adds a bottom line to every 5th rows wks.UsedRange.FormatConditions.Add Type:=xlExpression, Formula2:="=MOD(ROW(),5)=0" With wks.UsedRange.FormatConditions(2).Borders(xlBottom ) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Next wks End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop/Conditional formatting 3 cells above - More than 3 conditions | Excel Programming | |||
Subject - Loop/Conditional formatting 3 cells above. - more than 3 | Excel Programming | |||
Conditional Formatting in For:Next loop - won't work!!! | Excel Programming | |||
Conditional Formatting in a Loop | Excel Programming | |||
conditional formatting & a loop | Excel Programming |