Excell Functions

G

Guest

I have a spredsheet that has a column of colours related to work i.e. Red,
white the a second column has numbers. I would like to use a function that
can add only cells that match certain colours. i.e if B2, 5,7,10 has Red and
D25.7.10. has value but the imbetween cells have different colours. I need to
be able to use a some to only add up the value in column D which relate to
Red in column B.

Can anyone help on this one.

Thank you
 
P

Pete_UK

There is no built-in function to allow you to count colours directly,
so you have to make use of a user-defined function to return the
colour of a cell, and then count this. JE gave you a link to Chip
Pearson's site which shows how to do it - here's another link to Bob
Phillip's site which covers the same topic:

http://www.xldynamic.com/source/xld.ColourCounter.html

Read one of them !!

Hope this helps.

Pete
 
R

RagDyer

Try this:

=Sumif(B:B,"Red",D:D)

OR
Enter the color you're looking for in another cell, so you can change it
without having to change the formula itself, say A1.

Then try this:

=Sumif(B:B,A1,D:D)
 

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