Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting - 2 conditions | Excel Discussion (Misc queries) | |||
2 conditions using conditional formatting | Excel Discussion (Misc queries) | |||
need 4 conditions for conditional formatting and there are only 3 | Excel Worksheet Functions | |||
Conditional Formatting for more than 3 conditions | Excel Worksheet Functions | |||
conditional formatting with four conditions | Excel Worksheet Functions |