0

I have the following data in LibreOffice:

enter image description here

As you can see there are 3 sets of measurement. I want to automatically feel in the D column with the following formula automatically. For example D2 will be

D2=sqrt((b2^2)+(c2^2))

and the same for D3, should be calculated by values of B3 and C3.

Whatever I try, it just sums the formula for the whole B and C column and puts it in a single cell (in this case D2) for me.

So how can I apply this formula to each cell of D column using the respective row number values of B and C columns?

  • Is what you show in the picture simply numbers entered in cells or have you done anything fancy, like define the whole thing as a table, or something similar? Are the entries part of an array range or something similar in another part of the spreadsheet? – fixer1234 Nov 19 '14 at 20:57
  • Does your formula actually contain "D2="? If so, you don't want the leading "D2"; it should start with "=". – fixer1234 Nov 19 '14 at 22:42
2

Enter =sqrt((b2^2)+(c2^2)) in D2,
then move back the selection (cursor) to D2.
Note that there is a tiny black square at the lower right of the selection frame.
Grab the tiny square with the mouse pointer, then pull it down onto all lines where you wish to have the formula.
... done.

Note: Works exactly the same in Excel.

Additional info:
To lock a reference (e.g. B2 above) place the cursor on the reference, then press SHIFT+F4 in LibreOffice (F4 alone in Excel).
Repeat the key-pressing for optional/alternatives of Column and/or Row locking - four presses cycles through all alternatives and you end up without locking again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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