Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet with a column that is light yellow in color. Base
on criteria, I use conditonal formatting to color some cells red i that column. I eventually want to count those red cells, but the colo index shows that they are still light yellow and not red. I use th following UDF to display the index number. Does anyone know why thi is, or is there another technique I should be using? Thanks belblanco Function CellColorIndex(InRange As Range, Optional _ OfText As Boolean = False) As Integer ' ' This function (UDF) returns the ColorIndex value of the Interior ' (background) of a cell, or, if OfText is true, of the Font in th cell. ' ex: =CELLCOLORINDEX(C32,FALSE) ' Application.Volatile True If OfText = True Then CellColorIndex = InRange(1, 1).Font.ColorIndex Else CellColorIndex = InRange(1, 1).Interior.ColorIndex End If End Functio -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
counting colored cells | Excel Discussion (Misc queries) | |||
Counting colored cells | Excel Worksheet Functions | |||
Counting colored cells | Excel Discussion (Misc queries) | |||
counting colored cells | Excel Discussion (Misc queries) | |||
Counting Colored cells in a database | Excel Discussion (Misc queries) |