Conditional Formatting

  • Thread starter Thread starter Felipe
  • Start date Start date
F

Felipe

I am working with some conditional formatting and I can
only add 3 conditions. Does anyone know if this is the
max number of conditions? I really need 6 conditions and
was hoping there is some way to add more...

Thanks,

Felipe
(e-mail address removed)
 
Yes...but it has to be done in code.....

Here is an example that can be modified for your use.....




Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer
If Not Intersect(Target, Range("A1:A10")) is Nothing Then
Select Case Target
Case 1 To 5
icolor = 6
Case 6 To 10
icolor = 12
Case 11 To 15
icolor = 7
Case 16 To 20
icolor = 53
Case 21 To 25
icolor = 15
Case 26 To 30
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If

End Su
 
Back
Top