View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gys Gys is offline
external usenet poster
 
Posts: 3
Default Conditional Formatted Cell Color Index

Hi,
this function returns the color code of a cell

Function CellColorCode(MyCell As Range) As Single
'
'Gys Nov-2004
'Function produces the Color Code of a Cell
'A Pivot Table can be used to count colored Cells
'
CellColorCode = MyCell.Interior.ColorIndex
'
End Function



"MDR5300" wrote in message
...
I need a little help in how to determine the color index of a cell that is
formatted with ondition formatting.

The spreadsheet formats the color of the cells to RED, Yellow, Or Green

with
conditional formatting and I need to be able to count the number of Cells

in
a range that are green. The cells interior color index properity does not
give me the color value when conditional formatting is used.

Im using EXCEL 2002 SP3