Right click on the worksheet tab that should have this behavior and select view
code. Paste this in:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
With Target
Select Case LCase(.Value)
Case Is = "abc": .Interior.ColorIndex = 5
Case Is = "def": .Interior.ColorIndex = 6
Case Is = "ghi": .Interior.ColorIndex = 7
Case Is = "jkl": .Interior.ColorIndex = 8
Case Is = "mno": .Interior.ColorIndex = 9
Case Is = "pqr": .Interior.ColorIndex = 10
Case Else
.Interior.ColorIndex = xlNone
End Select
End With
End Sub
Back to excel and type something in column A. (abc, def, ..., pqr will do
something with the color).
Chip Pearson has some nice notes about workbook/worksheet events at:
http://www.cpearson.com/excel/events.htm
If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm