Adding up all the positive numbers in Excel
Asked Answered
M

7

6

Is there a way to add up all of the positive numbers in a row/column but ignoring all of the negative numbers? Like SUM(), except that it ignores negative numbers. Would I have to use VBA? If so, how would I do it in VBA?

If it can't be done in Excel, can it be done in OpenOffice Calc?

Methoxychlor answered 20/10, 2009 at 19:16 Comment(3)
A quick Google would have got this for you ;)Orville
Dang, I got smoked by 5 answers in less than a minuteMaryalice
Yeah i missed it by 3 seconds.Orville
P
16

Use SUMIF. YTo sum all the positive numbers in Column A:

=SUMIF(A:A,">0")

Same function exists in Excel and Calc

Prototrophic answered 20/10, 2009 at 19:21 Comment(0)
A
0
=SUMIF(A1:A99,">0")
Artur answered 20/10, 2009 at 19:21 Comment(0)
O
0

Sure like this:

=SUMIF(B1:B50,">0")

This will add all positive numbers in cells B1 to B50.

Orville answered 20/10, 2009 at 19:21 Comment(0)
S
0

=SUMIF(A1:A4,">=0")

Stannwood answered 20/10, 2009 at 19:21 Comment(0)
J
0

SUMIF() will do the trick:

 =SUMIF(A1:A100,">0")

You could also use an array formula, but that's more complicated and has no benefit over SUMIF()

Jadda answered 20/10, 2009 at 19:21 Comment(0)
E
0

Get auxiliary row/colums, in another tab if necessary them fill them with =if(A5>0;A5;0). That will turn negatives to zero. Then sum those.

Endopeptidase answered 20/10, 2009 at 19:25 Comment(0)
Q
-2

I am an excel noob...and after an hour or so of wondering what I am doing wrong and why wont it work for me, I realize how important each symbol is. this formula should have a semicolon instead of comma. Once I changed that the formula didn't give me any errors =sumif(A:A;">0") hope this helps

Quenna answered 31/5, 2013 at 22:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.