Formula

  • Thread starter Thread starter Tahir
  • Start date Start date
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
 
One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=SUM(IF(A1:A1000>0, A1:A1000, ""))
 
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
 
Back
Top