Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
David wrote
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("I5:S55").FormatConditions.Delete If Intersect(Target, Range("I5:S55")) Is Nothing Then Exit Sub With Range(Cells(Target.Row, 9), Cells(Target.Row, 19)) .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 6 End With End Sub Was able to reduce to this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Range("I5:S55").Interior.ColorIndex = 2 If Intersect(Target, Range("I5:S55")) Is Nothing Then Exit Sub Range(Cells(Target.Row, 9), Cells(Target.Row, 19)).Interior.ColorIndex = 6 End Sub Works as desired. -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i highlight the ten highest numbers in a range? | Excel Discussion (Misc queries) | |||
highlight the cell based on the range for a given value | Excel Discussion (Misc queries) | |||
Highlight a range for data entry | Excel Discussion (Misc queries) | |||
Macro to Highlight Range | Excel Discussion (Misc queries) | |||
want highlight when all cells in range are equal | Excel Worksheet Functions |