Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default 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
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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Increasing Conditional Formatting from 3 to 5 Evans9939 Excel Discussion (Misc queries) 8 February 24th 06 07:40 AM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 02:49 AM.

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"