Thread: Auto text color
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dan Oakes Dan Oakes is offline
external usenet poster
 
Posts: 16
Default Auto text color

Well since you only have 12 different values you might think about
using a delimited list, otherwise you could always put your source
data on a hidden worksheet.

Also, the rng needs to stay at "A1", that's probably why you are
having problems.

Try this, it's probably better suited for what you are doing:


Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
i = Target.Row
Set rng = Range("A1").CurrentRegion

If Target.Column = 12 Then

Select Case Cells(i, 12)
Case "a"
rng.Rows(i).Font.ColorIndex = 4
Case "b"
rng.Rows(i).Font.ColorIndex = 44
Case "c"
rng.Rows(i).Font.ColorIndex = 3
End Select

End If

End Sub


Hope this helps,
-- Dan