On my dependent list, I want to clear cell contents if another cell changes.
It works if I change the "Type" to clear "Style" and "Color".
However, I cannot figure out how to clear "Color" if "Style" only changes.
Here's the code I'm using:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("d2:g2")) Is Nothing Then
Range("d4:g4").ClearContents
Range("d6:g6").ClearContents
End If
End Sub
It works if I change the "Type" to clear "Style" and "Color".
However, I cannot figure out how to clear "Color" if "Style" only changes.
Here's the code I'm using:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("d2:g2")) Is Nothing Then
Range("d4:g4").ClearContents
Range("d6:g6").ClearContents
End If
End Sub