• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help regarding running totals/cumulative sum with changing signs (+/-)

hs321

New Member
I have one column (AM) which has + and - %'s. I would like to have a running total of the +% and -% values separately. Is there a formula or combination of formulas to do this? I have tried some formulas (incorrectly). TIA .

Excel.png
 
that SUM() should work , unles the column AM is wrong for some reason

attached a simple sample
maybe you can also attach a sample
and what version of excel
 

Attachments

  • cumlative-ETAF.xlsx
    8.8 KB · Views: 3
Try:
=SUMIF(AM$5:AM5,IF(AS5>0,">0","<0"))

Not sure what you want to happen if AM value is 0?
 
I have reservations about the idea of summing percentage change. If you apply -50% twice, do you finish with -100% or -75%? For percentages applied successively the formula would be
= (1 + p₁)(1 + p₂) - 1
A 365 solution to the problem would be
Code:
= SCAN(0,change, LAMBDA(x,y, (1 + x) * (1 + y) - 1))
as a single calculation, or
Code:
= LET(
    pos, SCAN(0,change, LAMBDA(x,y, (1 + x) * (1 + y*(y>0)) - 1)),
    neg, SCAN(0,change, LAMBDA(x,y, (1 + x) * (1 + y*(y<0)) - 1)),
    HSTACK(IF(change>0, pos, ""), IF(change<0, neg, ""))
  )
with positive and negative movements accounted separately
1725357052779.png
 
Back
Top