
Originally Posted by
rodneykaye
Thank you Rick
This works just fine.Can it work without the word of the colour being visible.Just want the colour to be available
I guess the easiest way is to make the font color the same as the background color...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("C3,E3,G3,I3,C9,E9,G9,I9,C15,E15,G15,I15")) Is Nothing Then
Select Case Target.Value
Case "RED": Target.Interior.ColorIndex = 3
Case "BLUE ": Target.Interior.ColorIndex = 5
Case "GREEN": Target.Interior.ColorIndex = 4
Case "YELLOW": Target.Interior.ColorIndex = 6
Case "WHITE": Target.Interior.ColorIndex = 2
End Select
Target.Font.ColorIndex = Target.Interior.ColorIndex
End If
End Sub
I highlighted the line of code I added to do this so you can see how it is done.
Bookmarks