You could use a sheet change event macro
To install macro to correct location
Copy this macro
GoTo Excel
Select sheet this is to appy to
Right Click on Sheet Name Tab > select View Code
Paste macro into the Worksheet Module displayed
example of worksheet change macro
This example works only on cells a1 & b1
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
For Each Rng In Target
If Not Application.Intersect(Rng, Range("a1:b1")) Is Nothing Then
Application.EnableEvents = False
With Rng.Interior
.Pattern = xlSolid
Select Case Rng.Value
Case 5
.ColorIndex = 3
Case 4
.ColorIndex = 6
Case Else
.ColorIndex = xlNone
End Select
End With
End If
Next Rng
Application.EnableEvents = True
End Sub
Bookmarks