Dear all,
I know there is a way to decide the color of a cell depending on the vaule of a cell. Since I am working with Excel 2000 there is only a maximum of 3 preset profiles. But i want more so I found a VBA script on the internet but it doesn't seem to work.
Here is my script:
When I change the vaule of a field in the "H" column i want it to change the fill colour. But now when i change the value nothing happens. I tried to restart excel but still nothing happens.
Can Anyone tell me what i do wrong?
I know there is a way to decide the color of a cell depending on the vaule of a cell. Since I am working with Excel 2000 there is only a maximum of 3 preset profiles. But i want more so I found a VBA script on the internet but it doesn't seem to work.
Here is my script:
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, Range("H:H")) Is Nothing _
Or Target.Cells.Count > 1 Then Exit Sub
With Target
Select Case .Value
Case "T5" To "t5"
.Interior.ColorIndex = 50
Case "T6" To "t6"
.Interior.ColorIndex = 20
Case "T7" To "t7"
.Interior.ColorIndex = 10
Case "T9" To "t9"
.Interior.ColorIndex = 5
End Select
End With
End Sub
When I change the vaule of a field in the "H" column i want it to change the fill colour. But now when i change the value nothing happens. I tried to restart excel but still nothing happens.
Can Anyone tell me what i do wrong?