Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Title basically says it all

lets say every day (1 day = 1 row) a number is being added in column A I want to have column B show the total of these numbers.

However, if I drag it down, it keeps moving 'B1' too, while i only want the second one to move +1 -->

so

Cell B1: '=A1' Cell B2: '=SUM(A1:A2)' Cell B3: '=SUM(A1:A3)' Cell B4: '=SUM(A1:A4)'

etcetera. Dragging this down doesn't give the wanted result. I hope my question is clear! Thanks in advance!

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

You don't do this by increasing the formula by a cell for each row. This is not possible.

Instead, you use as the formula

cell B1 = A1
cell B2 = SUM(B1, A2)
cell B3 = SUM(B2, A3) 

Now you can drag down the formula from B2 and B3 (don't include B1 in the selection!) for as many rows as you like.

share|improve this answer
add comment

Just for the sake of completeness ...

Insert in cell B1:

=SUM(OFFSET($A$1,0,0,ROW(A1)))

Then, just copy or drag it down.

Note that the answer by rumtscho is much more efficient, though.

share|improve this answer
add comment

Well, in that case ...

Use the following formula in B2:

=SUM(A$1:A2)

The $ sign is meant to fix the row. If you it drag horizontally, I will follow the column letters.

See answer given, here on Web Applications: http://webapps.stackexchange.com/a/27869/29140

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.