Hello
I was wondering if someone can tell me what’s wrong with this Change event code? I’m trying to change the colour of a range of cells C40:F50 based on the content of cell F40. Example, if the cell(F40) contains “CNX” the range of cells turns red. If the cell(F40) contain “Proposed” the range of cell turn yellow. I can’t get this to work.
Thanks in Advance
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 Then Exit Sub
If Target.Range = Range("F40") Then
Application.EnableEvents = False
Select Case LCase(Target.Value)
Case "CNX"
Target.Range("C40:F50").Interior.ColorIndex = 3
Case "PROPOSED"
Target.Range("C40:F50").Interior.ColorIndex = 40
Case Else
Target.Range("C40:F50").Interior.ColorIndex = xlColorIndexAutomatic
End Select
Application.EnableEvents = True
End Sub
Bookmarks