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")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value "red_word" Then
.font.colorindex = 3
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
HTH
Frank
Hi ,
I apologise in advance for the rudimentary nature of this post but I
am new to Macros.
What I am trying to do is create a macro that changes the colour of a
word's font after it has been typed into a cell. For example when I
type the word red into a cell I would like to be able to run a macro
to turn the entry into the word red (typed in the red font colour).
An associated question. Is it possible to have more than three types
of conditional formatting within a single spreadsheet?
thanks, Nik
---
Message posted from http://www.ExcelForum.com/