Talk

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':-

2
-1
3
-7
4
-9

=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

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

Get started »