hello,
I have the following code and it works well, but if I apply a conditional format to any of the cells in the range, the code does not work because the conditional format takes over.
Is there a way for the code to take priority over any conditional format available in Excel?
Thank you :)
I have the following code and it works well, but if I apply a conditional format to any of the cells in the range, the code does not work because the conditional format takes over.
Is there a way for the code to take priority over any conditional format available in Excel?
Thank you :)
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For Each cl In Range("$A17:$I1500")
If Not cl.HasFormula And cl <> "" Then
cl.Interior.ColorIndex = 5
End If
Next cl
End Sub