Hello, i want to change the cell color of different letters, an example is :
case i type in the range "k", set the interior color to an rgb.
Here the code :
If Not Intersect(Target, Range("WW:WW")) Is Nothing Then
For i = 1 To Len(Target.Value)
Select Case Target.Characters(i, 1).Text
Case "l"
Target.Characters(i, 1).Interior.Color = RGB(192, 0, 0)
Case "m"
Target.Characters(i, 1).Interior.Color = RGB(112, 48, 160)
Case "p"
Target.Characters(i, 1).Interior.Color = RGB(255, 255, 0)
Case "g"
Target.Characters(i, 1).Interior.Color = RGB(252, 178, 222)
Case "k"
Target.Characters(i, 1).Interior.Color = RGB(128, 128, 0)
Case Else
Target.Characters(i, 1).Interior.ColorIndex = 0
End Select
Next
End If
Bookmarks