Formula

T

Tahir

there are positive and negative values in one column.
i want to sum only positive values.

thanks

early repose will be appriciated

Tahir Nadeem
 
J

J.E. McGimpsey

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=SUM(IF(A1:A1000>0, A1:A1000, ""))
 
G

Gord Dibben

One more method using a macro. Operates like the AutoSum except Positive
values only. Assign it to a Button or shortcut key combo.

Sub PosSum()
Set Rng = Selection
Set rng1 = Rng.Offset(Rng.Rows.Count, 0).Resize(1, 1)
rng1.Formula = "=Sumif(" & Rng.Address & ","">0""," _
& Rng.Address & ")"
End Sub

Change the "">0"" to ""<0"" to sum Negatives only.

Gord Dibben Excel MVP XL2002
 

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