# Delete blank row with macro

**URL:** <https://community.glideapps.com/t/delete-blank-row-with-macro/36723>\
**Category:** Ask for Help\
**Created:** [January 5, 2022, 1:15pm UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723 "2022-01-05T13:15:02Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 6:53am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/21 "2022-01-06T06:53:46Z")

</div>

It’s okay, I’ll try again later.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 6:54am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/22 "2022-01-06T06:54:23Z")

</div>

ok, let me know… I’m very curious what it is… i never experience self-copy script

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 8:10am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/23 "2022-01-06T08:10:32Z")

</div>

OK, it’s working. 😅 Thanks, Uzo, and also Darren.  
My next question is which of the two ways above is the best?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 8:12am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/24 "2022-01-06T08:12:58Z")

</div>

Darren code is to delete blanc rows, my code is to delete marked row when is marked for deletion, so you need to decide what you need

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 8:29am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/25 "2022-01-06T08:29:57Z")

</div>

Darren’s method is more related to formula problems in the spreadsheet itself, such as the example array formula problem. And the advantage is that it can track automatically which ones are empty as a whole.  
Can both be used for different cases at the same time?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 8:32am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/26 "2022-01-06T08:32:53Z")

</div>

yes, my script will fire when you write ###delete to any cell, Daren’s is time-driven

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 8:34am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/27 "2022-01-06T08:34:45Z")

</div>

Today I had very valuable enlightenment.  
Now… confused as to which one I need to mark as a solution. 😅

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 8:36am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/28 "2022-01-06T08:36:10Z")

</div>

hahahahah, good luck …

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 8:54am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/29 "2022-01-06T08:54:02Z")

</div>

As per my original purpose, I put more emphasis on deleting rows, and Glide itself cannot overwrite rows that have been cleaned, so I think the option to delete rows is more appropriate to mark rows for deletion with a script on Google.  
Another advantage is that it is possible to delete freely by marking on any line without having to start from the bottom up (hope I’m right).  
The way Uzo is patching the problem of deleting rows in Glide. Now I got extra work to replace all row delete actions into a column value set to flag. Tired but fun. 🚩 🚩 🚩

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 9:00am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/30 "2022-01-06T09:00:00Z")

</div>

Extra advice… when you mark for deletion using my code, use filters in glide not to show items that have ###delete word… it takes up to 10 seconds for glide to sync with gs…

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 9:05am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/31 "2022-01-06T09:05:10Z")

</div>

Yes, working quietly behind. I guess by showing no extra columns and no filter needed.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 9:07am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/32 "2022-01-06T09:07:39Z")

</div>

Or you can use double action, first mark for deletion, then delete the row… this way you dont need to use filters

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 9:13am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/33 "2022-01-06T09:13:23Z")

</div>

I suspect something strange might happen if you do both. I’ve seen this a few times where sometimes it’s been deleted in Glide and it’s not showing up in the spreadsheet. Once in GS appears synced back in Glide and vice versa.  
My previous attempt to delete a row only took 2-3 seconds, then I didn’t know when to sync back to Glide. Shouldn’t be long

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 9:15am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/34 "2022-01-06T09:15:38Z")

</div>

No, use custom action, two steps…  
mark for daletion, that will trigger the script  
Then delete the row… that will clear data

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 9:18am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/35 "2022-01-06T09:18:09Z")

</div>

With one click: if-then-then- go back?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 6, 2022, 9:18am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/36 "2022-01-06T09:18:55Z")

</div>

No, custom action… no need for if else

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 6, 2022, 9:20am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/37 "2022-01-06T09:20:43Z")

</div>

Yes, I mean continuous actions in one custom action. I will try it.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 7, 2022, 9:20am UTC](https://community.glideapps.com/t/delete-blank-row-with-macro/36723/38 "2022-01-07T09:20:58Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

[Previous page](https://community.glideapps.com/t/delete-blank-row-with-macro/36723.md?page=1)
