Counting the number of coloured cells

M

Mat][

Hi all,

I would love to be able to count the number of cells in a row that are
coloured yellow or the number of cells that are coloured green.

Is this possible?

Mat
 
H

Harlan Grove

Mat][ said:
I would love to be able to count the number of cells in a row that are
coloured yellow or the number of cells that are coloured green.

Is this possible?

If these colors are the result of conditional formatting, then use the same
conditions in a conditional sum. For example, if yellow corresponds to cells
= 100 but < 1000 while green corresponds to cells >= 1000, then the sum of
yellow would be given by

=SUMIF(Range,">=100")-SUMIF(Range,">=1000")

and sum of green would be given by

=SUMIF(Range,">=1000")

On the other hand, if there's no set pattern for the colors, you need to use
VBA to write user-defined functions to do this. See

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top