View Single Post
  #1   Report Post  
David
 
Posts: n/a
Default Restrict Highlighting?

I've seen this from Bob Phillips:

'-----------------------------*------------------------------*-----
Private Sub WorkSheet_SelectionChange(ByVa*l Target As Range)
'-----------------------------*------------------------------*-----


Cells.FormatConditions.Delete
With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.*ColorIndex = 35
End With
With Target.EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.*ColorIndex = 35
End With
With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.*ColorIndex = 36
End With


End Sub

How can I restrict it to specific range - Range("J5:S55")

--
David