# Apply an existing formula in Google Sheet when a new item is added by the user

**URL:** <https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079>\
**Category:** Ask for Help\
**Created:** [November 28, 2020, 9:34pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079 "2020-11-28T21:34:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![olivier\_eldani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/olivier_eldani/32/17273_2.png) [@olivier\_eldani](https://community.glideapps.com/u/olivier_eldani)\
**Post date:** [November 28, 2020, 9:34pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/1 "2020-11-28T21:34:56Z")

</div>

Hi guys,

I want to apply a formula that already exists in my google sheet for previous lines, when someone add a new item.

To be precise:

 ![Capture d’écran 2020-11-28 à 22.33.27](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75722b5510d444365835324212780385702da1fb.png)

I want to automatically apply the Google Formula you see in F29 to a new stock the user could add via the Glide App.

 ![Capture d’écran 2020-11-28 à 22.35.14](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/7/c73afddb2d8b3d128c322a24d3079bcf943c0127.png)

I look into the Arrayformula, but couldn’t find any solution that works.

Many thanks

---

<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:** [November 28, 2020, 10:25pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/2 "2020-11-28T22:25:10Z")

</div>

You can try the script here in my post.

> [@Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727):
>
> Hi, Today I will show you the script that can make copying formulas down work, when it does not work with arrayformula. But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it. I hope it can help you in building your Glide apps as well as applying it in your normal day job. 
> 
> > **1/ Definition**
> >
> > Arrayformula is defined as “a range, mathematical expression using one cell range …

---

<div class="post-metadata">

**Author:** ![olivier\_eldani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/olivier_eldani/32/17273_2.png) [@olivier\_eldani](https://community.glideapps.com/u/olivier_eldani)\
**Post date:** [November 29, 2020, 11:12am UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/3 "2020-11-29T11:12:01Z")

</div>

Thanks I’ll have a look

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [November 29, 2020, 11:16am UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/4 "2020-11-29T11:16:41Z")

</div>

@olivier_eldani just wanted to say a quick hello and to welcome you to the community.

---

<div class="post-metadata">

**Author:** ![olivier\_eldani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/olivier_eldani/32/17273_2.png) [@olivier\_eldani](https://community.glideapps.com/u/olivier_eldani)\
**Post date:** [November 29, 2020, 1:31pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/5 "2020-11-29T13:31:57Z")

</div>

Hi @rosewebstudio  
many thanks ! I really appreciate it

---

<div class="post-metadata">

**Author:** ![Nadir\_Abdelrahman\_MD](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nadir_abdelrahman_md/32/5237_2.png) [@Nadir\_Abdelrahman\_MD](https://community.glideapps.com/u/Nadir_Abdelrahman_MD)\
**Post date:** [November 29, 2020, 7:17pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/6 "2020-11-29T19:17:26Z")

</div>

=ARRAYFORMULA(if(A2:a="","",GOOGLEFINANCE(a2:a,“price”)))

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [November 29, 2020, 7:22pm UTC](https://community.glideapps.com/t/apply-an-existing-formula-in-google-sheet-when-a-new-item-is-added-by-the-user/19079/7 "2020-11-29T19:22:23Z")

</div>

It looks like the only thing keeping you in Google Sheets is the Google Finance formula? We should add this to Glide.
