# Google sheet delete multiple

**URL:** <https://community.n8n.io/t/google-sheet-delete-multiple/4047>\
**Category:** Questions\
**Created:** [January 28, 2021, 6:46am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047 "2021-01-28T06:46:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxbaluev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/maxbaluev/32/3258_2.png) [@maxbaluev](https://community.n8n.io/u/maxbaluev)\
**Post date:** [January 28, 2021, 6:46am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/1 "2021-01-28T06:46:02Z")

</div>

Better way to lookup and delete multiple raws from sheet?

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [January 28, 2021, 6:55am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/2 "2021-01-28T06:55:52Z")

</div>

Hey @maxbaluev!

Just to make sure, I understand it correctly, you want to lookup for specific values and then delete them from the spreadsheet, right?

Also, are you using the Google Sheets node or the Spreadsheet File node?

---

<div class="post-metadata">

**Author:** ![maxbaluev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/maxbaluev/32/3258_2.png) [@maxbaluev](https://community.n8n.io/u/maxbaluev)\
**Post date:** [January 28, 2021, 6:57am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/4 "2021-01-28T06:57:20Z")

</div>

It’s a google sheet. The number of lines to delete is large - I’m afraid to run into limits if I delete one line at a time. What is the best way to delete if the lines are not one after the other, but scattered throughout the document?

---

<div class="post-metadata">

**Author:** ![harshil1712](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/harshil1712/32/1374_2.png) [@harshil1712](https://community.n8n.io/u/harshil1712)\
**Post date:** [January 28, 2021, 8:39am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/5 "2021-01-28T08:39:54Z")

</div>

I am afraid it is not possible to use the Google Sheets node directly do this. Pinging @RicardoE105 here. He might have a solution.

---

<div class="post-metadata">

**Author:** ![huuich](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/huuich/32/1115_2.png) [@huuich](https://community.n8n.io/u/huuich)\
**Post date:** [January 29, 2021, 3:57am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/6 "2021-01-29T03:57:26Z")

</div>

You can try setup Cron run delete by seconds?

---

<div class="post-metadata">

**Author:** ![maxbaluev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/maxbaluev/32/3258_2.png) [@maxbaluev](https://community.n8n.io/u/maxbaluev)\
**Post date:** [January 29, 2021, 8:22am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/7 "2021-01-29T08:22:43Z")

</div>

Yes, thank you, that’s the solution I’m using at the moment.

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [February 10, 2021, 3:29am UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/8 "2021-02-10T03:29:41Z")

</div>

@maxbaluev I guess you can first do the look-up to retrieve all the rows you want to delete and then use the split batches node with a small wait not to hit the rate limit when deleting all that items. It should look similar to the image below:

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/f/f253f9c1607ca60063044a015334f107b4483497.png)

---

<div class="post-metadata">

**Author:** ![huuich](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/huuich/32/1115_2.png) [@huuich](https://community.n8n.io/u/huuich)\
**Post date:** [February 10, 2021, 5:46pm UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/9 "2021-02-10T17:46:17Z")

</div>

Could you share the code of this workflow?

---

<div class="post-metadata">

**Author:** ![rexnguyen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/rexnguyen/32/21902_2.png) [@rexnguyen](https://community.n8n.io/u/rexnguyen)\
**Post date:** [December 28, 2023, 3:00pm UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/10 "2023-12-28T15:00:40Z")

</div>

After each delete, the order of the row changes causing a problem with the next loop. How can you go around it? or is there any other way to selectively delete multiple rows?

---

<div class="post-metadata">

**Author:** ![Mohammad\_Hosein\_Taji](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohammad_hosein_taji/32/34756_2.png) [@Mohammad\_Hosein\_Taji](https://community.n8n.io/u/Mohammad_Hosein_Taji)\
**Post date:** [January 30, 2024, 3:08pm UTC](https://community.n8n.io/t/google-sheet-delete-multiple/4047/11 "2024-01-30T15:08:32Z")

</div>

you can do it in this way if you are using google sheet.

1. find the rows you want to delete.
2. use a merge node in this way :

- all the data as input 1
- row you want to delete as input 2  
keep non matches and set input 1 as output data.

1. clear the sheet.
2. append output of merge node into the sheet.
