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

  • Thread starter Thread starter hcamelion
  • Start date Start date
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.
 
=SUMPRODUCT(--(A1:A5>0)*(A1:A5))

or

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

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

HTH
 
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.
 
Back
Top