JDP said:
I have a spreadsheet that I add to each day. One column
is a list of account numbers. I have about 7 account
numbers that I want to turn a different color when they
are entered. I can use conditional formatting to enter 3
of the numbers but I need to have all 7 represented.
Thanks,
Hi
conditional format only accepts 3 conditions though you have a fourth
if you include the default format.
If you only want to apply different FONT colors based on NUMBERS, you
can define up to 6
different styles. See:
http://www.mcgimpsey.com/excel/conditional6.html
for instructions how to do it
For everything else you'll need VBA code (e.g. process the
worksheet_change event and apply your format based on the cell values).
The following will color the text in A1 red if the value in A1 is equal
to 'red_word':
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A1:A100")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
Select Case .Value
Case 1: .Font.ColorIndex = 3
Case 2: .Font.ColorIndex = 10
'etc.
End Select
End With
CleanUp:
Application.EnableEvents = True
End Sub