View Single Post
  #4   Report Post  
Don Guillett
 
Posts: n/a
Default

Use a worksheet_event with select case to change your format,something like
this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
With Target
Select Case Target.Value
Case Is = 76
.Interior.ColorIndex = 3 '(red shade)
Case Is = 52
.Interior.ColorIndex = 4 '(green shade)
Case Is = 26
.Interior.ColorIndex = 46 '(orange shade)
Case Is = 11
.Interior.ColorIndex = 41 '(blue shade)
Case Is = 6
.Interior.ColorIndex = 6 '(yellow shade)
End Select
End With
End If
End Sub


--
Don Guillett
SalesAid Software

"Nick" wrote in message
...
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick