How to creat a running sum

  • Thread starter Thread starter Juha
  • Start date Start date
J

Juha

How to create a running sum with excel so that sum grows every time
there is added a new number to cell which is linked to it? Other
words: =SUM(A1)+(1){number 1 which will be added repeatedly, A1 is
supposed to grow} -> equation works fine first time, but not when
added next number 1.

Equation is meant to calculate quiery results from choices yes/no.

Thank you advance

Juha
 
The question doesn't seem to be quite clear to me, but you can use
row() or
column() function
to get a growing number.

Tomek
 
If I understand, you want something like =A1+A2 in cell
A2, and when you enter a number in A1, then the value in
A2 increments by that value. Normally doing something
like this results in a circular reference error, but it
can be handled by selecting from the menu Tools then
Options, click the Calculation tab, check the Iterations
check box, and enter 1 in Maximum iterations. This is a
wee bit dangerous though, because it may run away from
you. If you hit the F9 key to recalculate a sheet, the
value in A2 will be incremented by the value in A1. And
everytime you close and open the book, it will also add
the values. So to prevent this you will have to put a
zero in A1 before closing the file. Also, if you open
another file before opening this one, the iterations
option may be disabled resulting in a circular reference.
So really your safest bet is to put your values in
consecutive cells in a column and add the whole column.
 
I'm not sure exatly what you're asking, but try this...

=IF(a2="Yes",a1+1,a1), assuming a2 is your query.
 
Juha said:
How to create a running sum with excel so that sum grows every time
there is added a new number to cell which is linked to it? Other
words: =SUM(A1)+(1){number 1 which will be added repeatedly, A1 is
supposed to grow} -> equation works fine first time, but not when
added next number 1.

Equation is meant to calculate quiery results from choices yes/no.

Thank you advance

Juha

I'll throw my guess in the ring, too. I think you might be asking for an
accumulator. Try

http://www.mcgimpsey.com/excel/accumulator.html

Dave
dvt at psu dot edu
 
Back
Top