# 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:** 6\
**Page:** 7

<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 9, 2022, 12:21am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/122 "2022-09-09T00:21:56Z")

</div>

> <https://stackoverflow.com/questions/27589578/google-apps-script-changing-column-format>

Maybe an App Script solution to format that column every time that Sheet has an update.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [September 9, 2022, 12:23am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/123 "2022-09-09T00:23:34Z")

</div>

Hola @IDEApps

Use the _TEXT(Number, Format)_ function

The syntax can be this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cfaeaa468f2fe83a95144b4c8d08ec0944243525.png)

Saludos!

---

<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 9, 2022, 12:25am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/124 "2022-09-09T00:25:37Z")

</div>

Does that keep the underlying data as a number? If that’s a yes then it will be the solution. I’m not sure how @IDEApps will use this and why it still needs to be a number under the hood.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [September 9, 2022, 12:32am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/125 "2022-09-09T00:32:02Z")

</div>

Ah… that is another story!

_Text()_ function always returns a text value 🫤

---

<div class="post-metadata">

**Author:** ![IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ideapps/32/42628_2.png) [@IDEApps](https://community.glideapps.com/u/IDEApps)\
**Post date:** [September 9, 2022, 12:38am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/126 "2022-09-09T00:38:55Z")

</div>

wow, thank you @gvalero! 👍🏼 🙌🏼

---

<div class="post-metadata">

**Author:** ![IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ideapps/32/42628_2.png) [@IDEApps](https://community.glideapps.com/u/IDEApps)\
**Post date:** [September 9, 2022, 1:56am UTC](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727/127 "2022-09-09T01:56:19Z")

</div>

Thank you for your link @ThinhDinh. Finally, I found the samples of relevant app script → [Set cell format with google apps script - Stack Overflow](https://stackoverflow.com/questions/38490800/set-cell-format-with-google-apps-script?rq=1)

[Previous page](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727.md?page=6)
