ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   more than 3 conditional formats (https://www.excelbanter.com/excel-worksheet-functions/206188-more-than-3-conditional-formats.html)

rory_r

more than 3 conditional formats
 
Is there a way of adding more than 3 conditional formats?

Pete_UK

more than 3 conditional formats
 
Presumably you don't want to upgrade to XL2007 ...

Bob Phillips has a free download, CFPlus, which gives you up to 30
conditional formats per cell, available he

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

Hope this helps.

Pete

On Oct 13, 9:28*pm, rory_r wrote:
Is there a way of adding more than 3 conditional formats?



Gord Dibben

more than 3 conditional formats
 
How many more?

Bob Phillips has an add-in that allows 30 CF conditions.

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

Or you could use event code.

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 UCase(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

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that module. Edit the range of "D:D" and the
criteria to suit.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP


On Mon, 13 Oct 2008 13:28:06 -0700, rory_r
wrote:

Is there a way of adding more than 3 conditional formats?




All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com