This won't help you since you have solved your problem with xld's fine help but others may find some value in my thoughts below.
Had you wanted to keep your formula intact but run the change event code, one can do it this way.
I am thinking that you may have used something like =RandBetween which would only trigger the Calculate event. There are other ways to do this of course. Here is one.
1. Make your Change code Public rather than Private. Add code to check each cell in the Target range rather than just one. This can be handy if you Change multiple target cells by copy/paste though making it Public would not matter in that case alone.
Public Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:C100" '<== change to suit
Dim c As Range, tCells As Range
On Error GoTo ws_exit
Application.EnableEvents = False
Set tCells = Intersect(Target, Me.Range(WS_RANGE))
If Not tCells Is Nothing Then
For Each c In tCells
With c
Select Case .Value
Case 1002: .Interior.ColorIndex = xlCIRed
Case 1005: .Interior.ColorIndex = xlCIYellow
Case 1015: .Interior.ColorIndex = xlCIBlue
Case 1019: .Interior.ColorIndex = xlCIGreen
Case Else: .Interior.ColorIndex = xlColorIndexNone
End Select
End With
Next c
End If
ws_exit:
Application.EnableEvents = True
End Sub
2. Using Sheet1 for the cells to change, put the xld's xlColorIndex code into a Module and this code:
Sub SetA1ToC100()
Sheet1.Worksheet_Change [A1:C100]
End Sub
3. We can now play the routine above to set the interior colors for Sheet1's A1:C100 with no Calculation event triggered which changes the values.
Another method is to use the Calculation event but that would execute each time something was calculated on Sheet1 which may or may not be what you wanted.