color format translated to number

  • Thread starter Thread starter John Costakis
  • Start date Start date
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
 
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
 
Back
Top