Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional format cell ranges with loop?
I require the ability to conditionally format a rather large range o
cells from a macro and I'm thinking that a loop of some variety woul be the ticket. However tonight was my first foray into VB so I'm no all the sure what I'm doing yet, simple as it may be. So here's the scenario: PHP code ------------------- sub macro() Range("D13").Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _ Formula1:="=""x""" Selection.FormatConditions(1).Font.ColorIndex = xlAutomatic Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=COUNTIF($D$13:$Q$13,""A"")=2" Selection.FormatConditions(2).Font.ColorIndex = 46 Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=COUNTIF($D$13:$Q$13,""A"")=3" Selection.FormatConditions(3).Font.ColorIndex = 3 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Format based on date ranges | Excel Worksheet Functions | |||
Loop through ranges | Excel Programming | |||
Loop through ranges columns | Excel Programming | |||
How to loop through all ranges in a worksheet | Excel Programming | |||
loop to name ranges | Excel Programming |