# LO Basic Macro to copy a cell to the cell below

Hi, would be nice if someone wants to provide this to me. I do not manage to do this step with recording a macro.

Cell content is a formula which shall just be pasted in the cell below.

Lupp has already made a pasting macro for me so the copying macro would be enough I guess.

edit retag close merge delete

(To call a macro for the purpose is more complicated than to do it manually. Conclusion: The macro will be called by anoter macro.)
In what way shall the macro come to know the cell to copy: Active cell? Selected cell? Cell passed as an object? Cell position passed by numeric parameters? Cell name (address) passed?
Is there a need to test for a "single-cell-assurance" kept?
Is there a need to test for the content cell.Type to be 3 meaning "content is formula"?

( 2017-05-10 11:44:43 +0200 )edit

Thank you.

( 2017-05-10 12:31:11 +0200 )edit
1

In Calc, you can use the keyboard shortcut Ctrl-' (Control tick) to copy from the cell above.

( 2017-05-10 23:04:00 +0200 )edit

@EasyTrieve: This does not work with my German keyboard. (The shortcut is defined by default. Don't worry. I will not try to use the command.)

( 2017-05-10 23:55:36 +0200 )edit
1

@Lupp, Perhaps I should have referred to the function: Fill Single Edit. Not sure what key it's hooked up to for you.

( 2017-05-11 00:47:18 +0200 )edit

@EasyTrieve: we are talking of the same command. I am working with English (UK) UI but with German keyboard. The shortcut Ctrl+' is defined but does not work. On my keyboard ' is Shift+#.
But if I delete this shortcut and replace it with Shift+Ctrl+' it doesn't work either. However, I can assign the command to some different key combination. It does work with Ctrl+F, e.g.

( 2017-05-11 01:23:21 +0200 )edit

Sort by » oldest newest most voted

You can record this macro yourself. Try it, it's not difficult. You just need to write only one action - pressing the key combination Ctrl+D

more

1

Hi - Just add to not forget enable ToolsOptionsLibreOfficeAdvancedEnable macro recording

Regards

( 2017-05-10 11:00:54 +0200 )edit

Very cool. Thanks. Worked here.

( 2017-05-10 12:30:16 +0200 )edit

These macros may do just what you want.

If this answer helped you, please accept it by clicking the check mark ✔ to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

more

Thank you. I do not know Pyhton or can use it, only Basic in LibreOffice. And I want to integrate it in an existing macro.

( 2017-05-10 09:37:04 +0200 )edit

You just need to install the macros in the link to use them.No need to integrate; the functionality is all there.

( 2017-05-10 10:44:24 +0200 )edit

Thank you.

( 2017-05-10 12:33:08 +0200 )edit

As of LibO Calc 6.0.1.1 (that's what I've got, anyway), this is "built-in" as a standard keyboard shortcut:

• CTRL+' in Win and Linux;
• CMND+' in OSX.

(That's "apostrophe", btw.) Works quite nicely. No need for macros.

more

1

You may want to read the comments by @EasyTrieve and by @Lupp (myself) on the original question.

For exactly the operation described in the OQ I actually use the slightly longer key sequence Shift+ArrowDown, Ctrl+D.

( 2018-03-18 12:01:38 +0200 )edit