Experts Exchange connects you with the people and services you need so you can get back to work.
Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal Target As Range)
Set sh = ActiveSheet
Dim cll As Range
For Each cll In sh.UsedRange
Select Case cll.Value
Selection.Interior.ColorIndex = 6
Selection.Interior.ColorIndex = 16
Selection.Interior.ColorIndex = 25
Open in new window
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim cel As Range
Set rng = Intersect(Target, Me.Range("a1:c3"))
If rng Is Nothing Then Exit Sub
For Each cel In rng.Cells
Select Case cel.Value
cel.Interior.ColorIndex = 14
cel.Interior.ColorIndex = 13
cel.Interior.ColorIndex = 12
cel.Interior.ColorIndex = 11
cel.Interior.ColorIndex = -4142
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $389.00.
Premium members get this course for $62.50.