# ARRAYFORMULA and blank rows

**URL:** <https://community.glideapps.com/t/arrayformula-and-blank-rows/55907>\
**Category:** Ask for Help\
**Created:** [December 20, 2022, 9:14am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907 "2022-12-20T09:14:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![baremeter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/baremeter/32/28090_2.png) [@baremeter](https://community.glideapps.com/u/baremeter)\
**Post date:** [December 20, 2022, 9:14am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907/1 "2022-12-20T09:14:10Z")

</div>

Google sheet  
When I have a “ARRAYFORMULA” it works great for the 650 rows that I need it on, but the spreadsheet has 1,000 rows and so it puts data in each cell down to the last line.  
The problem is that in my app, it is sorting by name (that does not have an arrayformular) and so it is displaying 350 blanks names at the top of my inline list.  
Can I just delete the unwanted rows?

 ![Screenshot 2022-12-20 at 10.11.58](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/2/52da5ebc28e8529dcdfd1f2b0ef65772144bcaff.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 20, 2022, 9:38am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907/2 "2022-12-20T09:38:25Z")

</div>

> [@baremeter](#):
>
> Can I just delete the unwanted rows?

You can, and you should.

But you should also fix your arrayformula so that it doesn’t do that.

Better still, get rid of the arrayformula and replace it with one or more Glide computed columns.

---

<div class="post-metadata">

**Author:** ![baremeter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/baremeter/32/28090_2.png) [@baremeter](https://community.glideapps.com/u/baremeter)\
**Post date:** [December 20, 2022, 10:21am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907/3 "2022-12-20T10:21:05Z")

</div>

Thank you for your reply  
but it took me for ever to find how to do my ArrayFormulars-  
what would I need to add to restrict the action to a set number of lines- ?-  
**And** what sort of computed column in Glide could perform the same ?  
Thanks

=ArrayFormula((SUBSTITUTE(SUBSTITUTE($R$2,“name”,O2:O),“ref”, A2:A)))  
**Or**  
=ARRAYFORMULA(IF(Q2:Q=“”,SUBSTITUTE(SUBSTITUTE(TRANSPOSE(TRIM(QUERY(TRANSPOSE(IFERROR(CHAR(VLOOKUP(CODE(MID(Q2:Q,TRANSPOSE(ROW(INDIRECT(“W1:W”&MAX(LEN(Q2:Q))))),1)),CODE(U2:V),2,0)))),9^99)))," “,”“),”|“,” ")))

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 20, 2022, 10:34am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907/4 "2022-12-20T10:34:56Z")

</div>

It’s really difficult to tell what that formula is doing without any surrounding context. But just looking at it I’d guess you’d probably need some combination of relations + lookups + templates.

I’d suggest having a look at the below. It might give you some ideas:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/6/06207ec1c914c124eb78995b1f837f93f2956727.jpeg "Glide: Replace 14 Excel Formulas with Glide Computed Columns") ](https://www.youtube.com/watch?v=YITKadLUKNE)

(Arrayformulas are covered at 12:45)

---

<div class="post-metadata">

**Author:** ![Geraldine\_Costa](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/geraldine_costa/32/19642_2.png) [@Geraldine\_Costa](https://community.glideapps.com/u/Geraldine_Costa)\
**Post date:** [December 20, 2022, 11:53am UTC](https://community.glideapps.com/t/arrayformula-and-blank-rows/55907/5 "2022-12-20T11:53:02Z")

</div>

Bonjour @baremeter

J’ai résolu ce problème en ajoutant une petite condition dans ma formule arrayformula:  
=arrayformula(SI(\*\*$A$2:$A=“”;“”;\*\*RECHERCHEV($B$2:$B;ADMIN!$U$2:$Z;2;FAUX)))

Je lui fait comparer une valeur (nom pour toi si j’ai bien suivi), et s’il n’y en a pas, il n’affichera rien, sinon, il me fait ma recherche.  
Tu ne devrais plus avoir de valeurs dans les cellules qui ne t’intéressent pas.  
Dans le data de glide, les lignes ne devraient pas apparaitre non plus.

Maintenant, c’est un peu du bricolage, j’imagine qu’il y a des méthodes plus professionnelles!
