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

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.