Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting a colour that is Conditionally Formatted
I have a grid that conditionally formats the background colour to Green,
Red or White depending on a criteria. I want to count the number of times green appears in a row. I've tried modifying the CountByColor Function but to no avail. Is this possible? TIA Jon Function CountByColor(InputRange As Range, ColorRange As Range) As Long Dim cl As Range, TempCount As Long, ColorIndex As Integer ColorIndex = ColorRange.Cells(1, 1).Interior.ColorIndex TempCount = 0 For Each cl In InputRange.Cells If cl.Font.ColorIndex = ColorIndex Then TempCount = TempCount + 1 Next cl Set cl = Nothing CountByColor = TempCount End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A UDF for Counting Coloured Cells that are conditionally formatted | New Users to Excel | |||
Conditionally Formatted Cells | Excel Discussion (Misc queries) | |||
Can you add the number of conditionally formatted cells?? | Excel Worksheet Functions | |||
Counting conditionally formatted cells | Excel Worksheet Functions | |||
Counting colour formatted cells | Excel Worksheet Functions |