Summing Cells by Color

D

Dtemp

Is there a Way to use the SumIf formula to Sum the Cells of a Certain Text
Color. For example i would like the cells that have a text color of red in a
certain column to be added up, and if the text of any other cell is that
column is changed to red it will automaticaly place it in the sum. If the
Sumif does not work is there another way i can use, i have little or no
progamming skills.
 
R

Roger Govier

Hi

What causes the cells to be Red?
Is it formatting where negative numbers are Red?
If so, then
=SUMIF(A:A,"<0")
If they are Red because of Conditional Formatting, then let us know the
formula you are using for the condition.
 
C

Chip Pearson

See http://www.cpearson.com/Excel/colors.aspx for functions that return the
color indices of a range of cells (either background color or font color).
You can then use this function to perform "sum by color", "average by
color", and similar functions. The page contains all the code plus a
downloadable example.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
D

Dtemp

Thank you for the help, hope the next version will auto refresh the numbers
as they are highleighted in a certain color instead of clicking F9 every time
:)
 

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