Hello, I was hoping someone could tell me why, the code below is inserted in my worksheet, when multiple cells are selected and cleared by right clicking and selecting "clear contents" they are shaded the color for the "OFF" Case, but when the same steps to clear are performed on only one cell it remains white? Also if you could suggest some changes so that when the cells are cleared I do not get a Type Mismatch error, that would be great.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
On Error Resume Next
'change the conditions below
Select Case Target.Value
Case "OFF"
icolor = 35
Case "RTO"
icolor = 8
Case "vacation"
icolor = 8
Case "10-9 SBP"
icolor = 38
Case ""
icolor = 2
Case Else
End Select
Target.Interior.ColorIndex = icolor
End Sub
Thanks!
Clayton Grove
Bookmarks