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

Hi Dan,
Thanks. My data validation starts in column L. Would I have to put the
color index on a separate sheet for this to work?

"Dan Oakes" wrote:

Oops, that should be:


Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

i = Target.Row

Set rng = Range("A1").CurrentRegion

For i = 1 To rng.Rows.Count

Select Case Cells(i, 1)
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

Next i

End Sub


-- Dan