# Autonumbering arrayformula that skips a blank cell but maintains sequence - how?

**URL:** <https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215>\
**Category:** Ask for Help\
**Created:** [September 22, 2020, 10:08pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215 "2020-09-22T22:08:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [September 22, 2020, 10:08pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/1 "2020-09-22T22:08:08Z")

</div>

I have the below formula in cell A1 to generate sequential event IDs (DS ID). I’m open to an improved version.

`={"DS ID";ARRAYFORMULA(IF(X2:X<>"","DS-"&TEXT(ROW(X2:X)-1,"0000"),""))}`

When an event is cancelled (e.g. DS-0011), the formula will skip a cell (A13) and the numbering restarts in A14 with DS-0013. I need for that to be DS-0012 instead. Possible?

Thanks!

![snip](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/7/7278c541dabc94002704225dbca3e2cb410ef48b.png)

---

<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 23, 2020, 1:39am UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/2 "2020-09-23T01:39:56Z")

</div>

You can do it like this.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/8f6f4cf1f157ac8d74141bf6b0751b016370b884.png)

```
={"Event ID";ARRAYFORMULA(IF(B2:B=FALSE,"DS-"&(TEXT(COUNTIFS(B2:B,FALSE,ROW(A2:A),"<="&ROW(A2:A)),"0000")),""))}
```

---

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [September 23, 2020, 2:11am UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/3 "2020-09-23T02:11:19Z")

</div>

thank you @ThinhDinh! I’m halfway there as I already have a checkbox column. Only issue is it’s a checkbox component in from a Glide form and when it’s not ticked, cells in column B will not populate empty checkboxes which in turn breaks the formula. I remember reading that arrayformula/checkbox is not a thing but I’ll keep digging.

You can see how here how it stops working with the first new form submission in A18. All prior empty checkboxes were entered manually.

 ![snipnew](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/224db768fac3741cb9edf5346ae5f1636ddbd080.png)

---

<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 23, 2020, 2:23am UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/4 "2020-09-23T02:23:22Z")

</div>

I modified it to is not TRUE.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/d6409c1fcee11e4b47ee55c9f8d65e71f3cf3957.png)

You can check the sheet here.

> **[Thinh Dinh's lab V2.0](https://docs.google.com/spreadsheets/d/1JzBrp4R1zK9CMfmTzWWcPPep9-ZCl3OXxgWu27NWCy8/edit#gid=2118886818)**
>
> Robert Test
> 
> Project,Task,Project,Task,Combined
> A,siLxzsQURZK3QGl0Zhqg7w, yLz8ofPiQrC8Y6BYfpm.CQ,A,siLxzsQURZK3QGl0Zhqg7w,A - siLxzsQURZK3QGl0Zhqg7w
> jRzXZcVgQruv37w-gFQ6Kg, zp5bp3uIQoWwJYAH0a-vgQ,yLz8ofPiQrC8Y6BYfpm.CQ,...

---

<div class="post-metadata">

**Author:** ![Rasha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rasha/32/4585_2.png) [@Rasha](https://community.glideapps.com/u/Rasha)\
**Post date:** [September 23, 2020, 4:13am UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/5 "2020-09-23T04:13:08Z")

</div>

Like a charm. Thanks so much!

---

<div class="post-metadata">

**Author:** ![Antonino\_Nolasco](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/antonino_nolasco/32/80601_2.png) [@Antonino\_Nolasco](https://community.glideapps.com/u/Antonino_Nolasco)\
**Post date:** [December 6, 2023, 3:39pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/6 "2023-12-06T15:39:28Z")

</div>

Can I do it with Glide table? I have a table containing orders that are automatically numbered progressively. I need a system to reset the numbering from a new year and start again from order number 1. @ThinhDinh

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 6, 2023, 7:15pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/7 "2023-12-06T19:15:24Z")

</div>

How do you currently have your auto numbering set up?

---

<div class="post-metadata">

**Author:** ![Antonino\_Nolasco](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/antonino_nolasco/32/80601_2.png) [@Antonino\_Nolasco](https://community.glideapps.com/u/Antonino_Nolasco)\
**Post date:** [December 6, 2023, 8:32pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/8 "2023-12-06T20:32:20Z")

</div>

With lookup and row index. @Jeff_Hager

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 6, 2023, 10:13pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/9 "2023-12-06T22:13:07Z")

</div>

Ok perfect, I was hoping you were using that method. I think if you create a Relation that links a year in that row to itself, then you can point your lookup column to that relation. Everything else should just work and I think the numbers will start from 1 for each year.

---

<div class="post-metadata">

**Author:** ![Antonino\_Nolasco](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/antonino_nolasco/32/80601_2.png) [@Antonino\_Nolasco](https://community.glideapps.com/u/Antonino_Nolasco)\
**Post date:** [December 7, 2023, 7:36am UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/10 "2023-12-07T07:36:53Z")

</div>

Thanks @Jeff_Hager  
It works like a charm, better than a balm! 😃

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:49pm UTC](https://community.glideapps.com/t/autonumbering-arrayformula-that-skips-a-blank-cell-but-maintains-sequence-how/16215/11 "2024-01-17T16:49:07Z")

</div>


