[Solved] Move cell content down on Enter

Discuss the spreadsheet application
Post Reply
Mandalore
Posts: 1
Joined: Mon Nov 20, 2023 8:34 pm

[Solved] Move cell content down on Enter

Post by Mandalore »

Here's the rough scenario i'm trying to create:
There is text in cell A2. I type something into A1. As soon as i hit enter, i want the text that was originally in A2 to move down to A3, the text i just typed into A1 to move down to A2, and A1 to be empty again. And so on and so forth, until i reach the bottom of the document.
Is this in any way possible or am i wasting my time trying to figure this out? Thanks in advance.
Last edited by MrProgrammer on Wed Nov 29, 2023 6:56 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
OpenOffice 4.1.11 on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 4788
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Automatically move cell content down on enter

Post by MrProgrammer »

Hi, and welcome to the forum.
Mandalore wrote: Mon Nov 20, 2023 8:42 pm As soon as i hit enter, i want the text that was originally in A2 to move down to A3, the text i just typed into A1 to move down to A2, and A1 to be empty again.
Calc does not work the way you would like when Enter is pressed. Behavior upon pressing Enter is in option Calc → General → Press Enter to move selection. It's the selection which moves, not the data. Options are set with OpenOffice → Preferences on a Mac, Tools → Options on other platforms. Doing what you'd like is not one of the choices. I disable (uncheck) the option so that the selection does not change when I press Enter. The suggestion below is based on this behavior.

However, I can record a macro to shift cell content down.
• Tools → Macros → Record → Insert → Cells → Shift cells down → OK → Stop Recording
Then I give my macro a name and save it. The tutorial in my link discusses assigning a keyboard shortcut, say F3, to a macro. I tested the macro and it does what you've asked for.

You can record your macro using those steps and assign F3 to it. After you do this once, then
• type data in A1 and press Enter
• press F3 to shift column A down and leave A1 empty.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Zizi64
Volunteer
Posts: 11243
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Automatically move cell content down on enter

Post by Zizi64 »

And so on and so forth, until i reach the bottom of the document.
What you meant as "bottom of the document"? The Calc has about a million of Rows. Do you mean one Page to Print?

Of course it may possible (by usage of the macros).
Tibor Kovacs, Hungary; LO6.4.7-7.4.6 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.5.4;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply

Return to “Calc”