Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
More than 3 Conditions for formatting
I would like to be able to use conditional formatting for more than 3
conditions. Any suggestions? Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
More than 3 Conditions for formatting
'----------------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) '----------------------------------------------------------------- Const WS_RANGE As String = "H1:H10" '<=== change to suit 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. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Dan" wrote in message ... I would like to be able to use conditional formatting for more than 3 conditions. Any suggestions? Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
More than 3 Conditions for formatting
Sometimes you can by using AND() and OR() operators if your conditions
are not mutually exclusive- basically combining two or more conditions into one. Please post your desired conditions. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
More than 3 Conditions for formatting
I don't know if this will help but you actually get 4 formats (the 3 that you
define via conditions that you set with conditional formatting and then the "default" format, i.e. the format of the cell if none of the conditions are met). Will "Dan" wrote: I would like to be able to use conditional formatting for more than 3 conditions. Any suggestions? Thanks |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
More than 3 Conditions for formatting
Thank you to everyone!
"roadkill" wrote: I don't know if this will help but you actually get 4 formats (the 3 that you define via conditions that you set with conditional formatting and then the "default" format, i.e. the format of the cell if none of the conditions are met). Will "Dan" wrote: I would like to be able to use conditional formatting for more than 3 conditions. Any suggestions? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need 4 conditions for conditional formatting and there are only 3 | Excel Worksheet Functions | |||
Need 6 Conditions / Conditional Formatting | Excel Worksheet Functions | |||
More than 3 conditions for formatting | Excel Discussion (Misc queries) | |||
I have more than 6 conditions when using conditional formatting? | Excel Worksheet Functions | |||
More than 3 Conditional Formatting Conditions | Excel Worksheet Functions |