View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Marco Marco is offline
external usenet poster
 
Posts: 69
Default PLEASE HELP: More then 3 conditions on Conditional Formatting

Hi. thanks.

I found a formula that is not on Excel 2007 named as OR and Excel 2003 don't
have AND. But I was able to joing both and now I have only one condition. If
it TURE or if it is False.

Thanks.

Regards,
Marco





"Toppers" wrote:

What are the conditions and formulae?

If you really have more than 3 conditions, you will need to use VBA.

Code courtesy of Bob Phillips:

'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "H1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Select Case .Value
Case 1: .Interior.ColorIndex = 3 'red
Case 2: .Interior.ColorIndex = 6 'yellow
Case 3: .Interior.ColorIndex = 5 'blue
Case 4: .Interior.ColorIndex = 10 'green
End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.




"Marco" wrote:

Hi. I working on a sheet that controls date. Start and End dates. I have
serveral columns with start and end dates. I need more then 3 condition to
fill cells color if a formula is finded.

Name Start End Start End Start End Start End Start End

I need more then 3 condions on Conditional Formatting so I can check those 4
date range.

there's no problem if I use the same color. I can only use one condition
that control all date range what Formula should I use?

Now I'm using the formula AND and its working but in this case only works
with two conditions.

Please help me.

Regards,
Marco