ARRAYFORMULA and blank rows

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?

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.

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 ?

=ArrayFormula((SUBSTITUTE(SUBSTITUTE($R$2,“name”,O2:O),“ref”, A2:A)))

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:

(Arrayformulas are covered at 12:45)

Bonjour @baremeter

J’ai résolu ce problème en ajoutant une petite condition dans ma formule arrayformula:

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!