Sum value Upper 0

L

ldiaz

I want to sum datas of a column with these Datas.

Usage Total Price
33.5 $65.5
-32.5 $-50.5
-1.5 $-5
1.5 $5

But I want to Sum only values upper 0. it should be: Usage Total: 35.5 &
$70.5

also I want the viceversa.



please help

ldiaz
 
R

RagDyer

If you want separate totals for each column:

=SUMIF(A2:A5,">0")
=SUMIF(B2:B5,">0")

=SUMIF(A2:A5,"<0")
=SUMIF(B2:B5,"<0")

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
D

Don Guillett

a simple sumif should do it
=SUMIF(H2:H22,">0")
or
=SUMPRODUCT((H2:H22>0)*H2:H22)
 
D

Dave Peterson

Take a look at =sumif() in excel's help:

=sumif(a2:a99,">0")
and
=sumif(a2:a99,"<0")

You could even put a value in another cell:

=sumif(a2:a99,"<"&b1)
to add up all the values less than the value in B1
 
R

Roger Govier

One way
=SUMPRODUCT(--(A1:A4>0),A1:A4)
for total positive values - answer is 35 not 35.5

=SUMPRODUCT(--(A1:A4<0),A1:A4)
for total negative values - answer -34.0

Change ranges for price and alter range size to suit.

Regards

Roger Govier
 
B

B. R.Ramachandran

Hi,

Use the formulas,

=SUMIF(A2:A100,">0") for summing positive quantities, and
=SUMIF(A2:A100,"<0") for summing negative quantities,

where A2:A100 is the range of cells considered. Modify the range
appropriately.

Regards,
B. R. Ramachandran
 
Top