Question

In LibreOffice Calc I have three columns. The first and second columns are values and the third is the difference between the first two. There are many rows so to fill the third column with formulas I placed the formula $A1-$B1 into the first cell and dragged down filling the subsequent rows.

But then I want to be able to move the entire second row up and down, aligning different row values to see their differences. When I highlight and move the second column, the formulas move with it.

What was $A1-$B1 is now $A1-$B2. Usually a great bit functionality but in this instance it's frustrating. I wanted it to remain A1-B1.

The solution is easy, $A$1-$B$1, the problem with that is, like I said, there are many rows and going through each formula and adding that second $ is too time consuming, and dragging the $A$1-$B$1 places $A$1-$B$1 into each row.

[ EDIT ] While waiting for a response, I decided to work my way through the third column. Actually even when doubling up on the $A$1-$B$1 and then moving the contents of the second column the values for the third column change.

How can I avoid this?

Is there a way to apply the formula locks over a selection of formulas?

Was it helpful?

Solution

I asked at the LibreOffice forums and I was introduced to this function that... functions, perfectly.

=INDIRECT("A" & ROW() ) - INDIRECT("B" & ROW())
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top