PDA

View Full Version : COUNTIF formula with text color



wiehan1981
06-08-2012, 03:36 AM
Hi Everyone,

I was wondering if it is possible to use the COUNTIF formula with specific text color.?

Example: A4:A20 contains names. soome of these names are grey depending on the conditional formatting. if 11 of these cells are grey, can I use the COUNTIF formula to result 11?

Thanx guys.

Teeroy
06-08-2012, 05:17 AM
COUNTIF will test against the cell contents, not the cell format. The User Defined Function "CountColor" from Chip Pearson's code examples should work for you. See the link below.

http://www.cpearson.com/excel/colors.aspx

mikerickson
06-08-2012, 06:59 AM
Pearson's UDF will not detect color that is the result of Conditional Formatting.

Rather than looking at the color in of the cell, its easier to test the condition that triggers the color.

wiehan1981
06-09-2012, 01:52 AM
thanx guys, it really help!!