The ideal way is to use absolute references as in @Gary's Student's answer. But if you do not want to change the original formulas, then there are other workarounds.
One clever way is to copy a whole range of addresses by first removing the equals sign using Find and Replace (or by replacing with
a= as suggested here). Then copy and paste, and finally change it back to
=. This is illustrated in Method 3 at https://www.ablebits.com/office-addins-blog/2016/01/20/copy-formula-excel/#copy-formula-without-changing-references
What I have used in the past is the following key sequence:
- Edit the formula: F2
- Select the formula: Ctrl+a
- Copy the formula: Ctrl+c
- Exit the formula: Esc
Now paste the unchanged formula.
If this is something that you need to do often, it may be worth setting up a macro like this one, which does steps 1-3.
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:SetInputMode", "", 0, Array())
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
I played around with it for a few minutes but couldn't get it to do step 4 automatically.