Adding all positive numbers in Excel

Is there a way to add all positive numbers in a row / column, but ignore all negative numbers? Like SUM (), except that it ignores negative numbers. Should I use VBA? If so, how do I do this in VBA?

If this cannot be done in Excel, can it be done in OpenOffice Calc?

+6
excel sum worksheet-function
source share
7 answers

Use SUMIF. YTo sum all positive numbers in column A:

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

The same function exists in Excel and Calc.

+15
source share
 =SUMIF(A1:A99,">0") 
0
source share

Of course:

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

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

0
source share

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

0
source share

SUMIF () will do the trick:

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

You can also use an array formula, but it is more complicated and has no advantages over SUMIF ()

0
source share

Get auxiliary rows / columns, in another tab, if necessary, fill them = if (A5> 0; A5; 0). This will turn negatives into zero. Then sum them up.

0
source share

I'm an excellent noob ... and after an hour or so, wondering what I am doing wrong and why this does not work for me, I understand how important each character is. this formula should have a semicolon instead of a semicolon. As soon as I changed that the formula did not give me any errors = SUMIF (A :; "> 0") I hope this helps

-2
source share

All Articles