# How to move rows to another sheet

**URL:** <https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004>\
**Category:** Ask for Help\
**Created:** [August 31, 2020, 11:15am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004 "2020-08-31T11:15:56Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 31, 2020, 11:15am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/1 "2020-08-31T11:15:56Z")

</div>

Hi there. I’m really new with Glide and Zapier, but I was a programmer a long time ago and therefore I think I understand quickly and I hope to make you waste little of your precious time!  
For me Glide was a great rediscovery and is giving me great enthusiasm and desire to start programming again.  
This is the problem I actualy have: I want to move rows from a sheet to another sheet when a “confirm button” is pressed.  
I tried to use Zapier by triggering the button, but then I can’t select the row set to move (I need to move only rows that meet a certain condition). I don’t know if this approach is correct or if I have to look for another method to achieve my goal.  
Can someone help me?  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)\
**Post date:** [August 31, 2020, 11:35am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/2 "2020-08-31T11:35:10Z")

</div>

Hey!

Welcome to the community!

You can always add conditions to a ZAP where you can test the condition under which you want to copy the row to a different sheet.

If you can share a few more details, with screenshots, the community may surprise you with a better solution within Glide.

Have fun.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 31, 2020, 3:19pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/3 "2020-08-31T15:19:20Z")

</div>

Thanks Sardamit for your reply.  
I need to move (i.e. copy from one source sheet to another and then delete from the source sheet) a subset of rows that meet a certain condition (the condition is that of belonging to the same email as the authenticated user).  
As you can see from the screenshot details.jpg, here are two components: 1) an “Inline List” which shows the lines that belong to the user authenticated with the email “[emporiovapori@gmail.com](mailto:emporiovapori@gmail.com)”; 2) a button called “MOVE TO” to which an action on Zapier can be associated.  
In the screenshot “sheet-carrello.jpg” you can see the existence of the three lines that are associated with the user “[emporiovapori@gmail.com](mailto:emporiovapori@gmail.com)”; naturally this sheet will be populated with many other lines of many other different users. So, there is a need to select only the lines that belong to [emporiovapori@gmail.com](mailto:emporiovapori@gmail.com).  
The sheet Prenotati has the same structure of the Sheet Carrello (as you can see in screenshot “sheet-prenotati.jpg”); here we must copy the rows from Sheet Carrello, and then we must delete from Sheet Carrello.

Thanks again, I hope I’ve been exhaustive.

 ![details](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/832282fff24cab194a8d89784f40e8af3eb43dc3.jpeg) ![sheet-carrello](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/55d7d7949fa4ba1b9c566add75b04271ddbcf3f6.jpeg) ![sheet-prenotati](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/19fbb8c8ccdcadbb1ebb08fdaba77e32ffc71107.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 31, 2020, 4:19pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/4 "2020-08-31T16:19:27Z")

</div>

Is this only for extra work later in the Sheet or do you want something in the app?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [August 31, 2020, 5:13pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/5 "2020-08-31T17:13:30Z")

</div>

In the App.  
After this, more actions will be carried out in the “Prenotati” sheet.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 1, 2020, 5:21am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/6 "2020-09-01T05:21:48Z")

</div>

Probably you can try QUERY.

> [@Tutorial - QUERY: "The most powerful function" in Google Sheets (part 1)](https://community.glideapps.com/t/tutorial-query-the-most-powerful-function-in-google-sheets-part-1/10432):
>
> This topic was inspired by our last community meetup, in which we talked about some formulas in Google Sheets and some people want to know more about QUERY, which was branded [“The most powerful function in Google Sheets”](https://www.benlcollins.com/spreadsheets/google-sheets-query-sql/) by famous GSheets teacher Ben Collins. So, what is QUERY, and why is it so powerful. Here’s a writeup on it, which hopefully would help many of you here in this community. Trust me, it would change so much how many of you “clean” your data in the future from raw data, in a very…

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 1, 2020, 9:33am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/7 "2020-09-01T09:33:38Z")

</div>

I agree. But I should only trigger the query at the moment the “MOVE TO” key is pressed. Do you think it is possible through Zapier?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 1, 2020, 12:03pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/8 "2020-09-01T12:03:20Z")

</div>

Query will always refresh instantly so that would not be possible. Would the move to button move only 1 row at a time or multiple rows?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 1, 2020, 12:21pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/9 "2020-09-01T12:21:46Z")

</div>

Multiple rows.  
Thanks for your support

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 1, 2020, 2:25pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/10 "2020-09-01T14:25:19Z")

</div>

> [@sardamit](#):
>
> You can always add conditions to a ZAP where you can test the condition under which you want to copy the row to a different sheet.

So this is the way to go, probably the flow I imagine is:

- Button triggers the Zap to write a new row to Google Sheets, in a “Move Logs” sheet for example.

- Trigger another Zap so that when a new row is written to “Move Logs” sheet, go to the sheet that you want to move rows from, check all rows that satisfy your condition, then copy them to the destination.

- Go back to the origin sheet and update a column, let’s say “Sent” or anything like that so you won’t copy the same thing againn next time.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 1, 2020, 5:52pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/11 "2020-09-01T17:52:51Z")

</div>

Thanks ThinDinh, but (in your second step) are you sure it’s possible to “check all rows that satisfy your condition” ? That’s exactly what I can’t do in Zapier, there’s probably something I don’t know yet. It seems to me that it is not possible to select more than one row at a time. I will study better.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 2, 2020, 12:22am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/12 "2020-09-02T00:22:05Z")

</div>

> **[Finding/Updating Rows in Google Sheets](https://zapier.com/help/doc/findingupdating-rows-google-sheets)**
>
> If you’re looking to update a row in Google Sheets, you will need to first insert a search action to find the row ID. Updating a row will not work without adding this step first unless you plan on up...

Probably you need a “Search” step here to return multiple rows.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [September 2, 2020, 5:32am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/13 "2020-09-02T05:32:37Z")

</div>

Yes, I was thinking about this. However, an additional strategy is needed, because there will be multiple matches of rows that satisfy the condition, while the Zap can only work with the first row it encounters that satisfies the condition (If there are multiple matches, the Zap will return the first row it finds from the bottom up).  
So I have to find a way to re-launch the same ZAP as long as there are no other lines that meet the condition.  
Humm … maybe this is doable somehow.  
I see you keep following me … Many thanks for your help. Have a nice day!

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [June 15, 2021, 8:30pm UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/14 "2021-06-15T20:30:31Z")

</div>

@Roldy Hello sir. Do you still need help with this?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [June 16, 2021, 3:15am UTC](https://community.glideapps.com/t/how-to-move-rows-to-another-sheet/15004/15 "2021-06-16T03:15:45Z")

</div>

No thanks. At that moment I was in my first experiences, now everything is clear to me for that scenario.  
Thanks again @Eric_Penn
