Refresh colour in conditional formating excel
Last answer on Aug 16, 2009 4:31:25 am BST confused, on Aug 13, 2009 6:32:53 am BSTHello,
I have used the below vba code to format a drop down cell based on whether its pass or fail or block in excel(2000)
'START OF CODE
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim WatchRange As Range
Dim CellVal As String
If Target.Cells.Count > 1 Then Exit Sub
CellVal = Target
Set WatchRange = Range("F18:F197")
If Not Intersect(Target, WatchRange) Is Nothing Then
Select Case CellVal
Case "Pass"
Target.Interior.ColorIndex = 42
Case "Fail"
Target.Interior.ColorIndex = 7
Case "Block"
Target.Interior.ColorIndex = 5
Case "TBD"
Target.Interior.ColorIndex = 29
End Select
End If
End Sub
'END OF CODE
The problem is if i change the colour value of "Block" in the code from 5 to 10 the colour does not get automatically updated in the sheet. I need to select "Block" again from the drop down menu for it to work.
Is there a way i can automatically refresh it
Configuration: Windows XP Firefox 3.0.13
Try this
|

