Sum of a range if the value in cells are > 0

H

hcamelion

I need to get a sum of a range that included negative numbers...I dont
want the negative numbers in the sum. How do I add up just the
positive > 0 numbers.
 
G

Guest

=SUMPRODUCT(--(A1:A5>0)*(A1:A5))

or

=SUM((A1:A5>0)*(A1:A5))

enter the latter with Ctrl+Shift+Enter (array formula)

HTH
 
H

hcamelion

Thanks they all worked great. I actually had done one of the ones
mentioned =SUM((A1:A5>0)*(A1:A5)) but i didnt know about entering
Ctrl+Shift+Enter to designate it an array.
 

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