1

In Excel, I have a column with different values.

In this column, I want to subtract the value in A1 from the value in A2, the value in A3 from A4 and so on. I then want the result to show in the B column.

enter image description here

I found that this can be accomplished with SUM and OFFSET.

Can someone show me how exactly?

2 Answers 2

5

No SUM or OFFSET needed. Just put nothing in B1 and '=A2-A1' in B2. Next, select B1 and B2. Then copy-paste down (drag tge black square at the lower right of your selection or just select copy from the menu and select the target area an click paste).

The copy-paste copies the altering cell with nothing and the cell with the formula down below as far as you tell it to do.

0
1

For what it is worth,
the formula in B2 may also be set to be =SUM(OFFSET(B2,-1,-1,2,1))
- which might come in handy if you (for some reason) need to have it reference no other cells than itself.

The numbers in OFFSET() says this: -1,-1 - 'move up and left 1 step each', 2,1 - 'include two rows and one colum'... and then you have SUM() on these cells as OFFSET() is inside its parenthesis.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .