# Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts

**URL:** <https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727>\
**Category:** Ask for Help\
**Created:** [May 25, 2020, 1:10pm UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727 "2020-05-25T13:10:24Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Vicio\_Sciascia](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vicio_sciascia/32/4940_2.png) [@Vicio\_Sciascia](https://community.glideapps.com/u/Vicio_Sciascia)\
**Post date:** [June 20, 2020, 9:42am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/11 "2020-06-20T09:42:05Z")

</div>

Hi @ThinhDinh,  
thank you so much for sharing this tutorial.  
I’m trying with the good practices but i encountered an issue.

In column ‘U’ I have numeric values fetched from an API through ImportJSON function. For some reason Google Sheet doesn’t seem to recognize this data as numbers, so I made this trick to create an auxiliary column ‘Y’ with an ARRAYFORMULA that simply adds a zero to the values in ‘U’ column.

This trick works fine with a simple ARRAYFORMULA I put on Y2 cell:  
`=ARRAYFORMULA(IF(U2:U="","",U2:U+0))`

 ![Schermata 2020-06-20 alle 11.39.08](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/3d874fa55291a5100a7f33506f6775d36b76d37e.png)

Now, following the tutorial, I’m trying to do something more robust putting on Y1 this formula:

`={"Aqius Value";ARRAYFORMULA(IF(AND(H2:H="",U2:U=""),"",IF(AND(H2:H<>"",U2:U<>""),U2:U+0,IF(AND(H2:H<>"",U2:U=""),"No data"))))}`

And this is what I get:

 ![Schermata 2020-06-20 alle 11.21.08](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/286020f116e6e5d7eb25a00e14b9ce11864ad8de.png)

What I’m doing wrong? Any idea?

Thank you

---

_[View the full topic](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727)._
