Discussion Locked

Add As I Go

0 helpful
20 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Usin EXCEL for WIN 98 I want to keep a running total of the figures I put in a column. EX: In col A1 I insert 5 in A2 6, in cell b2 I want the result 11. Then in cell a3 I put in 4, b3 should = 15, in a4 I put 5, b4 should be 20. How can I copy the formula =SUM(a1+a2) so that it adds a3 a4 a5.....a256 as I enter figures?

20 replies

by murray_g

That will give me a total in cell B256. What about a running total from B2........B255?

by syscokid

Just copy it. Excel uses relative references unless you specify otherwise.

If you put =SUM(a1+a2) in cell b2, then copy it to cell b4, you will find that the formula has changed to =SUM(a3+a4).

Excel assumes that since you copied the formula 2 cells to the right, it should increment each of the cell references in the formula by two.

So you can copy that single formula of
=SUM(a1+a2) to every cell across row b and have it work correctly.

If you wanted the formula to ALWAYS refer to a1+b1 no matter where you copied it, the formula would be =SUM($a$1+$a$2). This is called absolute reference.

by syscokid

Next time I promise to read the question fully before answering it. I gave a heck of an answer, it's just not to the question you were asking. Sorry for wasting your time! :(

by syscokid

Thinking about it some more.

If in b3 you put=SUM(a3,b2) you would add what's in a3 to the result of the previous formula.

Then just copy the formula in b3 down the rest of the column.

by syscokid

Did you try my second suggestion?

1
5 =SUM(a1+a2)
4 =SUM(a3,b2}
5 =SUM(a4,b3)
3 =SUM(a5,b4)
etc.

by dklippert

This assumes that A1 contains a field name like Sales.

Go to Insert>Name Define.
In the Names in workbook box type MyRange
At the bottom in the Refers to box type:

=OFFSET(Sheet1$A2,0,0,COUNT(Sheet1$A:$A)+1)

This creates a dynamic range. You can now enter a formula somewhere else, even on another worksheet, such as =Sum(MyRange)
The range will continue to expand or contract as items are entered or deleted.

by hinrgman

use this simple formula

in B2 put =A1+A2
in B3 put =B2+A3
in B4 put =B3+A4
in B5 put =B4+A5
then highlight B3 thru B5 and expand it downward to as many cells as you want, placing a number in any cell in column A will give you a running total next to the number you entered. Then you can protect your cells and set certain criteria so you will not get error messages

by otl

Depends on where you want the total for a1+a2+a3;

simple formula
for b2 to be a running total
cell formula
b2 =a1+a2
b3 =a3+b2 (copy for all lower cells)

if you want c1 to be the running total;
= sum(a1:a60000)

by otl

sorry; copy for all lower cells should be copy and paste to all lower cells - excel will increment the row numbers as you paste.

by barbaratidy

If you use the formula below it will work.
You will only need to type in the first two formulas and then copy the formula A3+B2 down to get the result in cell B4 etc.

5
6 =SUM(A1:A2)
4 =A3+B2
5 =A4+B3

by l_lk

Hi, I think the col.B is a accumlated data of col A, I suggest you use the formula "if" to make you report beautiful. e.g. cell B3 input as formula:
=if(A3<>"",B2+A3,""), that mean "if cell A3 have data, cell B3 will calculate "B2+A3"and get the result 15, otherwise, cell B3 will show nothing.

row# col A col B formula of col B
r#1 5
r#2 6 11 =A1+A2
r#3 4 15 =if(A3<>"",B2+A3,"")
r#4 5 20 =if(A4<>"",B3+A4,"")

>copy cell B3 at cell B4 to B256
then, you will find that cell B will show u the last accumlated data as the row of you input at col.A.
>SPACE ROW WAS NOT ALLOW, otherwise, the accumlated data will incorrect.e.g.

row# col A col B formula of col B
r#3 4 15=if(A3<>"",B2+A3,"")
r#4 5 20 =if(A4<>"",B3+A4,"")
r#5 =if(A5<>"",B4+A5,"")
r#6 3 3 =if(A6<>"",B5+A6,"")

to get a correct accumlated data, pls input o in the cell A5, then cell B5 should be 20, and cell B6 should be 23
Or, you can rewrite the formula from cell B5 to B256 to get the correct data.
>p.s. for simple add data, direct input as =A1+A2
was more quick, the formula "sum" can use if you want sum up a range of data or diff field rang data such as : =sum(A1:B3) or =sum(A1:A3,C1:C3)
for more information, pls review the formula detail from the function icon "fx"

This discussion is closed to new replies.