I use this code so that I can have more than the standard 3 conditional formats, however, when I delete a row I get run time error. Is there any way to avoid the run time error?
Thanks
John
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("K:K")) Is Nothing Then
Select Case Target
Case "Zita Powell/Christa Collins"
Target.EntireRow.Select
Selection.Interior.ColorIndex = 8
icolor = 8
Case "Bo Hinnant"
Target.EntireRow.Select
Selection.Interior.ColorIndex = 43
icolor = 43
Case "Quint/Ray"
Target.EntireRow.Select
Selection.Interior.ColorIndex = 6
icolor = 6
Case "Xavier"
Target.EntireRow.Select
Selection.Interior.ColorIndex = 15
icolor = 15
Case ""
Target.EntireRow.Select
Selection.Interior.ColorIndex = 2
icolor = 2
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
Thanks
John
Last edited by a moderator: