Conditional Formatting

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Is there any way to have more than three conditional
formats placed on any one cell? I want to use about 12,
but EXCEL is limited to three.
 
Not with conditional formatting.

but you could use a worksheet event that could do the same type thing.

If you post back, be sure to explain how the cell will change--calculation or
typing.
 
I want to change the cell's colour. I'm doing up a
schedule, and I want to be able to colour the different
type of shifts that we're scheduling, so that a quick
glance shows whos who.
 
Right click on the worksheet tab that should have this behavior and select view
code. Paste this in:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub

With Target
Select Case LCase(.Value)
Case Is = "abc": .Interior.ColorIndex = 5
Case Is = "def": .Interior.ColorIndex = 6
Case Is = "ghi": .Interior.ColorIndex = 7
Case Is = "jkl": .Interior.ColorIndex = 8
Case Is = "mno": .Interior.ColorIndex = 9
Case Is = "pqr": .Interior.ColorIndex = 10
Case Else
.Interior.ColorIndex = xlNone
End Select
End With

End Sub

Back to excel and type something in column A. (abc, def, ..., pqr will do
something with the color).

Chip Pearson has some nice notes about workbook/worksheet events at:
http://www.cpearson.com/excel/events.htm

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Back
Top