Sum if cell = grey

L

LiAD

Hi,

Is it possible to have sum if cell = a colour?

If for example from row A1 to 20 I have a list of numbers each with or
without a cell fill colour as required. Is there a formula, (not code), I
can use to calculate the sum of all the cells coloured in grey for example
(colour index 15)?

Thanks
LiAD
 
G

Gord Dibben

How did the cells get to be colored?

Manually..........you will need code.

Conditional Formatting?

SUMIF or SUMPRODUCT by same criteria.


Gord Dibben MS Excel MVP
 
M

Michael.Tarnowski

Hi,

Is it possible to have sum if cell = a colour?

If for example from row A1 to 20 I have a list of numbers each with or
without a cell fill colour as required.  Is there a formula, (not code), I
can use to calculate the sum of all the cells coloured in grey for example
(colour index 15)?

Thanks
LiAD

Hi LiAD,
you find Excel Functions/Formulas to Count/Sum Excel Cells by Color on
oxgrid's site:
http://www.ozgrid.com/VBA/Sum.htm

HTH, have a nice day
Cheers Michael
 
L

LiAD

Hi,

Thanks for your help

The cells were manually coloured. However In order to avoid using code I
could put a T at the end of the number then use cond. format to colour it.
This would generate a list of numbers such as -: 3 5T 9562 65237T
0.9T 54….whatever. What is the simplest function I can use to sum if the
number contains T?

Thanks

Thanks
 
G

Gord Dibben

If you're going to adding a "T" don't add it to the numbers.

Add it in adjacent cells in a helper column then filter on the that column
for "T" and use

=SUBTOTAL(9,A1:A20)


Gord
 

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