Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 69
Default PLEASE HELP: More then 3 conditions on Conditional Formatting

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default PLEASE HELP: More then 3 conditions on Conditional Formatting

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default PLEASE HELP: More then 3 conditions on Conditional Formatting

Excel 2003 has both OR and AND functions.

"Marco" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting - 2 conditions Otto Moehrbach Excel Discussion (Misc queries) 3 March 27th 07 08:07 PM
2 conditions using conditional formatting jimar Excel Discussion (Misc queries) 3 March 8th 07 01:24 PM
need 4 conditions for conditional formatting and there are only 3 pm Excel Worksheet Functions 2 January 4th 07 07:51 PM
Conditional Formatting for more than 3 conditions MMM Excel Worksheet Functions 4 March 9th 06 01:43 AM
conditional formatting with four conditions Ring eye Excel Worksheet Functions 2 January 11th 06 12:35 AM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"