Advanced search

Google sheets - sum by colour

(4 Posts)
UnsuccessfullyAdulting Thu 17-Nov-16 16:19:49

Hello! I'm desperate for a formula which sums all cells which th a certain text or background colour. I can conditionally format either by text or background colour, but I need to add all cells with a <0 quantity into one number. Any help appreciated. TIA

DanFmDorking Thu 17-Nov-16 18:23:03

It's not too clear what you are asking for but -

With this column of data in column 'A':-


=SUM(A1:A6) adds all the numbers

=SUMIF(A1:A6,"<0") adds all the minus numbers

=SUMIF(A1:A6,"<0") adds all the positive numbers

To sum cells based on multiple criteria, see SUMIFS function.

DanFmDorking Thu 17-Nov-16 18:25:08

Oooops, there is a typing error

=SUMIF(A1:A6,">0") adds all the positive numbers

UnsuccessfullyAdulting Sat 19-Nov-16 22:58:42

Dan I nailed it with that formula. Thanks so much! You've saved me about 3 hours a week at work! smile

Join the discussion

Join the discussion

Registering is free, easy, and means you can join in the discussion, get discounts, win prizes and lots more.

Register now