Posted: Sun Oct 18, 2009 9:17 pm Post subject: Changing Font.ColorIndex in Column w/Integers and Strings
I need help with the following snippet, trying to change the color of numbers and text in a column. ("FINISHED" changes to red instead of being evaluated correctly to black:
Private Sub FormatCells()
Dim number As Range
For Each number In Range("e1:e500")
If number >= 10 Then
number.Font.ColorIndex = 3
ElseIf number >= 3 And number <= 7 Then
number.Font.ColorIndex = 10
ElseIf number = 0 Or number = "FINISHED" Then
number.Font.ColorIndex = 1
ElseIf number = "DUE" Then
number.front.ColorIndex = 3
End If
Next
End Sub
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum