Hi Lydia
I am assuming you want a different colour for each condition.
Conditional Formatting only allows three colours, but if you count the norm
of black on white as one, then it could be 4.
However, this small macro will colour the cells as per the contents, and can
be easily extended for more cases.
It first sets al of the cells in the range selected back to No Fill, then
colours the cell background according to the text found in the cell.
You can change the colour index to any value you want.
Sub FillColours()
Dim rng As Range, result As String
Selection.Interior.ColorIndex = xlNone
For Each rng In Selection
result = rng.Value
'failed, pass, pending and offer made
Select Case result
Case "failed"
rng.Interior.ColorIndex = 3 ' Red
Case "pass"
rng.Interior.ColorIndex = 6 ' Yellow
Case "pending"
rng.Interior.ColorIndex = 7 ' Pink
Case "offer made"
rng.Interior.ColorIndex = 4 ' Green
Case Else
End Select
Next
End Sub
To Install
Copy the code as above
Press Alt+F11 to invoke the VB Editor
Insert>Module ( or Alt+I+M )
Paste the code into the white pane that appears.
Alt+F11 to return to Excel
To Use
Highlight the range of cells you want to colour
Alt+F8 ( or Tools>Macros)
Select the macro FillColours
Run
--
Regards
Roger Govier
Lydia said:
I want a symbol or color to appear when I have the following words entered
into a cell (failed, pass, pending and offer made). I'm thinking I need an
IF
formula or conditional formatting, but I've never used either. I would
rate
myself as a 5 on Excel on a 1-10 scale. I'm no expert!
Thanks for all the help!
--
Lydia
__________ Information from ESET Smart Security, version of virus
signature database 4530 (20091021) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 4530 (20091021) __________
The message was checked by ESET Smart Security.
http://www.eset.com