Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not easy, but Chip has a function at his site
http://www.cpearson.com/excel/CFColors.htm IMO, it is better to count the conditions that force the colour. SO for instance, if the cells are green if the value is 10 then use =COUNTIF(A1:A100,"10") -- HTH RP (remove nothere from the email address if mailing direct) "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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you are writing a maco, instead of checking for interior color, you could
check for the conditions you use to format. eg if a cell value of 4 - 10 = green interior then search for cells with a cell value of 4 - 10 and that = your amount of green cells "MDR5300" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The OPs cells are coloured by conditional formatting. This routine will not
determine that colour, as the OP says, the ColorIndex property is not set by CF. -- HTH RP (remove nothere from the email address if mailing direct) "Gys" wrote in message ... 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry , my fault , I missed that
Gys "Bob Phillips" wrote in message ... The OPs cells are coloured by conditional formatting. This routine will not determine that colour, as the OP says, the ColorIndex property is not set by CF. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make all cells in same row match cell formatted with fill color | Excel Discussion (Misc queries) | |||
sum by conditional formatted color | Excel Discussion (Misc queries) | |||
Chart axes color index vs font color index | Charts and Charting in Excel | |||
How to get cell colorindex of conditional formatted cells | Excel Discussion (Misc queries) | |||
finding a Color Formatted Cell and then displaying a cell's value in same row?? | Excel Programming |