Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Increasing Conditional Formatting
What would be the approach to programatically increase
conditional formatting on a worksheet - beyond the limit of three in Excel - that operates the same way? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Increasing Conditional Formatting
Phil,
Use worksheet event code. You could trap the worksheet change event for the colouring to be set when the value changes, or the calculate event for any sheet change. Example of the former Private Sub Worksheet_Change(By Target As Range) Application.Enable = False On Error GoTo ws_exit: If (Not Intersect(Target, Range("colours")) Is Nothing) Then Select Case Target.Value Case "a": Target.Interior.ColorIndex = 3 Case "b": Target.Interior.ColorIndex = 4 Case "c": Target.Interior.ColorIndex = 34 Case "d": Target.Interior.ColorIndex = 35 etc. End Select End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob Phillips "Phil Hageman" wrote in message ... What would be the approach to programatically increase conditional formatting on a worksheet - beyond the limit of three in Excel - that operates the same way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Formatting cells in a column with conditional formatting? | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
Increasing Conditional Formatting from 3 to 5 | Excel Discussion (Misc queries) | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |