Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I have coded up the following to automatically set the Conditional Formatting for a cell: lLine = 28 With Range("D" & lLine ) .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="=$D" & lLine & "=""X""" .FormatConditions(1).Interior.ColorIndex = 3 .FormatConditions.Add Type:=xlExpression, Formula1:="=$D" & lLine & "=""Y""" .FormatConditions(2).Interior.ColorIndex = 5 End With When I run it, the actual Formula is =D37="X" rather than =D28="X". If I do a Range().Select and then the Selection.FormatConditions.XXX it works fine. Any idea what that is all about? Am I doing something wrong here? Thanks, Joe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting based on relative cell value | Excel Worksheet Functions | |||
Conditional Formatting with relative cells | Excel Discussion (Misc queries) | |||
Conditional Formatting Relative to adjacent cells | Excel Discussion (Misc queries) | |||
How do I set conditional formatting relative to another cell -XL20 | Excel Discussion (Misc queries) | |||
Conditional formatting changing relative when copied to other cell | Excel Worksheet Functions |