Macro to move row from one sheet to another, based on value?

Discuss the spreadsheet application
Post Reply
Parkz58
Posts: 3
Joined: Thu Nov 16, 2017 6:51 pm

Macro to move row from one sheet to another, based on value?

Post by Parkz58 »

Hello,

I'm woefully ignorant of how macros/scripts work, but I think this might be an easy fix...I just don't know where to begin.

I have a Calc file with multiple tabs/sheets. On my "Inventory" sheet, column B is labeled as "Sold?". I want to be able to set up a macro so that, when someone enters "Y" or "y" in column B, it will automatically cut that row from "Inventory", delete the empty row, and place the row at the bottom of another sheet labeled "Sold".

Also, how should I go about installing such a macro, if someone can write one? It seems much more difficult to do it in OpenOffice than it is in Google Docs or even Excel.

Is there anyone who can help me, please?

Thanks!

Parkz
OpenOffice 4.1.4
Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Macro to move row from one sheet to another, based on va

Post by Villeroy »

Data>Filter>Standard Filter...
Sold = "y"
[More Options]
Case sensitive = no
Move to OtherSheet.A1
[OK]
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Parkz58
Posts: 3
Joined: Thu Nov 16, 2017 6:51 pm

Re: Macro to move row from one sheet to another, based on va

Post by Parkz58 »

Thanks Villeroy!

However, it only gives me the option to "Copy" to the other sheet...and I want to move it entirely, with no trace left on the original sheet.

It just seems like this isn't going to work for what I'm trying to accomplish...it only works the first time I use it, then it seems to disappear...I want something that will stay in place, and work every time that the "Sold?" category has something entered in it...

Parkz
OpenOffice 4.1.4
Windows 10
Parkz58
Posts: 3
Joined: Thu Nov 16, 2017 6:51 pm

Re: Macro to move row from one sheet to another, based on va

Post by Parkz58 »

Is anyone able to help me with a more specific macro or script, and instructions on how to install/implement it?

Any help would be greatly appreciated!!
OpenOffice 4.1.4
Windows 10
Post Reply