color format translated to number

J

John Costakis

I have applied conditional fotmatting in some cells and
get back three different colors (green, yellow, red).
What I want to do is to sum these cells according to their
colors.
For example I have 5 cells with green color, 3 with yellow
and 2 with red ones.
How can I add them automatically below the data (using
formulas ?) and not do it by hand ?

Regards
 
P

Paul

John Costakis said:
I have applied conditional fotmatting in some cells and
get back three different colors (green, yellow, red).
What I want to do is to sum these cells according to their
colors.
For example I have 5 cells with green color, 3 with yellow
and 2 with red ones.
How can I add them automatically below the data (using
formulas ?) and not do it by hand ?

Regards

There are two ways.

The first is to construct formulas to sum conditionally, using the same
conditions as are used for the conditional formatting. (If a particular
condition turns the cell green, then summing conditional on that particular
condition is the same as summing green cells.) Post back with details of the
formulas you are using if you need more help.

The second needs VBA code; it cannot be done with worksheet functions. Look
here
for full details:
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