Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Simple Conditional Format with more than 3 options

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lionel B. Dyck - 16 Mar 2007 00:19 GMT
Is there a simple way to extend conditional formatting to cover more than 3
conditions?

thanks
Signature

Lionel B. Dyck  <><
AIM ID: lbdyck  Yahoo IM: lbdyck
Homepage http://www.lbdsoftware.com/
Blog: http://randommgmt.blogspot.com/

Dave Peterson - 16 Mar 2007 00:33 GMT
Upgrade to xl2007.

Or use an event macro that replaces the conditional formatting???

> Is there a simple way to extend conditional formatting to cover more than 3
> conditions?
[quoted text clipped - 5 lines]
> Homepage http://www.lbdsoftware.com/
> Blog: http://randommgmt.blogspot.com/

Signature

Dave Peterson

Gord Dibben - 16 Mar 2007 00:41 GMT
If CF'ing numerics, John MCGrimpsey shows how to get up to 6 different font
colors.

http://www.mcgimpsey.com/excel/conditional6.html

For anything else you are forced to use event code similar to this.

Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant
   Set vRngInput = Intersect(Target, Range("D:D"))
   If vRngInput Is Nothing Then Exit Sub
       On Error GoTo endit
   Application.EnableEvents = False
   For Each rng In vRngInput
   'Determine the color
       Select Case rng.Value
       Case Is = "A": Num = 10    'green
       Case Is = "B": Num = 1    'black
       Case Is = "C": Num = 5    'blue
       Case Is = "D": Num = 7    'magenta
       Case Is = "E": Num = 46    'orange
       Case Is = "F": Num = 3       'red
       End Select
   'Apply the color
   rng.Interior.ColorIndex = Num
   Next rng
endit:
       Application.EnableEvents = True
End Sub

Gord Dibben  MS Excel MVP

>Is there a simple way to extend conditional formatting to cover more than 3
>conditions?
>
>thanks
Gord Dibben - 16 Mar 2007 00:50 GMT
One more thing I just thought about.

You can try CFPlus add-in from Bob Phillips' site.

Allows up to 30 conditions.

http://www.xldynamic.com/source/xld.CFPlus.Download.html

Gord

>If CF'ing numerics, John MCGrimpsey shows how to get up to 6 different font
>colors.
[quoted text clipped - 35 lines]
>>
>>thanks
Lionel B. Dyck - 17 Mar 2007 06:38 GMT
> If CF'ing numerics, John MCGrimpsey shows how to get up to 6 different font
> colors.
[quoted text clipped - 35 lines]
>>
>> thanks

Thank you - something new to learn and try. Very much appreciated.

Signature

Lionel B. Dyck  <><
AIM ID: lbdyck  Yahoo IM: lbdyck
Homepage http://www.lbdsoftware.com/
Blog: http://randommgmt.blogspot.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.