![]() |
Conditional Formatted Cell Color Index
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 |
Conditional Formatted Cell Color Index
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 |
Conditional Formatted Cell Color Index
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 |
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 |
Conditional Formatted Cell Color Index
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 |
Conditional Formatted Cell Color Index
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. |
All times are GMT +1. The time now is 08:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com