Help summing positive and negative numbers

  • Thread starter Thread starter Irv
  • Start date Start date
I

Irv

I need to add up positive numbers in a column,
A B C
1 COLOR SIZE QTY
2 BLACK A 20
3 BLACK B -25
4 NAVY A -25
5 NAVY B -15
6 RED A 22
7 RED B -25

C2+C4+C6= 42 (Has to sum only the positive numbers)

C3+C5+C7= -65 (this I have to show as a ZERO inventory as all numbers are
negative)

Any help appreciated
 
Using Excel 97SR2 on Windows 98SE,

Using RagDyer's formula, I got 42 as the answer. I don't know why
yours is different.

HTH
Paul
 
Sorry, I get an answer of 42.
But I think what I need is a sumproduct formula that will show the sum for a
size >0, and when the answer is less than zero <0, show a zero
...

=MAX(0,SUMIF(...))
 
Why??

The answer you have given will only sum positive numbers. Anything less than 0, eg negative
numbers will be ignored, and if no positive numbers are found you will get a 0. This seems to be
in line with what you asked for. There seems little point in creating another formula to add up
all the negative numbers if you are only going to show the result as a 0 anyway??
 
This is for inventory. If you look at my example I didn't want to add up the
column, just the various sizes. Size A has 42 units in inventory. But size
B has -65 units. I have to show this as a zero inventory. I can't have a
negative inventory. I thought there might be a formula that does this, in
the mean time I did find a work around. I used a sumproduct formula to add
up the different sizes, then used a sumif to add up those totals and get my
positive numbers and ignore the negative ones.

It's thanks to this group that I even know what a sumproduct formula is!
Thank You
Irv
 
Back
Top