More than 4 conditional formating?
Hi Little Penny,
Conditional formatting, as such, only supports 4 conditions - the default
state plus 3 others. If you need more than this, you'll need to use vba to
format the range directly.
Cheers
--
macropod
[MVP - Microsoft Word]
"Little Penny" wrote in message
...
How do I get mon the 4 conditions on Range("A4:O500")
I would like to increase it to 7
Here is my current code
Cells.Select
Selection.FormatConditions.Delete
Selection.Interior.ColorIndex = xlNone
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A4:O500").Select
With Selection.Interior
.ColorIndex = xlNone
.Pattern = xlSolid
End With
Range("A4:M150").Select
'Using these three condition
' Always use the following line first for Cond Frmtng
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$N4=""SHIPPED"""
Selection.FormatConditions(1).Interior.ColorIndex = 4
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$I4=""IN PROUTE"""
Selection.FormatConditions(2).Interior.ColorIndex = 38
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$I4=""AMEX"""
Selection.FormatConditions(3).Interior.ColorIndex = 6
Range("N4:O150").Select
'Using these three condition
' Always use the following line first for Cond Frmtng
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$N4=""NOT SHIPPED"""
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$N4=""SHIPPED"""
Selection.FormatConditions(2).Interior.ColorIndex = 4
Range("A1").Select
|