Hi,
I have a performance spreadsheet which is setup to identify how different services are performing. I use the code below to identify the performace. This code does not update when I use IF statement or any simple formula. For example IF(A1=10,"h","hh"), this will not be update the colour once I have changed cell A1 to 10, although the formula will work and change to "h".
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Range("A1:V1000")) Is Nothing Then
With Target
Select Case Target.Value
Case (""): .Interior.ColorIndex = 0 'default
With Selection.Font
.Name = "Marlett"
.Size = 10
End With
Case ("h"): .Interior.ColorIndex = 3 'red
Case ("hh"): .Interior.ColorIndex = 45 'orange
Case ("hhh"): .Interior.ColorIndex = 6 'yellow
Case ("hhhh"): .Interior.ColorIndex = 43 'green
Case ("hhhhh"): .Interior.ColorIndex = 10 'Dark Green
End Select
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
I wonder if anyone can help me.
Thanks
Bookmarks