Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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

  #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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make all cells in same row match cell formatted with fill color zjopa Excel Discussion (Misc queries) 2 May 21st 08 04:26 AM
sum by conditional formatted color Dave F Excel Discussion (Misc queries) 2 March 14th 07 05:35 PM
Chart axes color index vs font color index [email protected] Charts and Charting in Excel 4 December 7th 06 04:05 PM
How to get cell colorindex of conditional formatted cells [email protected] Excel Discussion (Misc queries) 5 December 2nd 06 01:07 PM
finding a Color Formatted Cell and then displaying a cell's value in same row?? foamfollower Excel Programming 3 January 26th 04 03:17 PM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"