# Fill in Columns as Rows are Added

**URL:** <https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589>\
**Category:** Ask for Help\
**Created:** [September 10, 2020, 3:48pm UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589 "2020-09-10T15:48:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 10, 2020, 3:48pm UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/1 "2020-09-10T15:48:03Z")

</div>

Hi!

Is there a way to automatically add data columns to a sheet once a new row is created?

For each business, I have additional columns I created to display within the app, but I have to manually type them in every time a new row is added.

Thanks!

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [September 10, 2020, 4:28pm UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/2 "2020-09-10T16:28:04Z")

</div>

Can you share more details about what exactly you want to do?

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 11, 2020, 12:03am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/3 "2020-09-11T00:03:18Z")

</div>

My app is a directory of businesses.A businesses fills out a google form with their information which gets sent the master sheet.

After this,I have to fill in additional columns, such as tags, roles, passwords, avatars, etc.  
I would like for this to automatically populate once a new row is added.

Is this possible?

---

<div class="post-metadata">

**Author:** ![ionamol](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ionamol/32/1951_2.png) [@ionamol](https://community.glideapps.com/u/ionamol)\
**Post date:** [September 11, 2020, 12:12am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/4 "2020-09-11T00:12:16Z")

</div>

Sure @Jen_NYCP, I do this all the time using GSheet ARRAYFORMULA.

ARRAYFORMULA is used when you need to place a formula in the first cell os a column and what that formula to be repeated in every cell below.

For example, if I need the content from every new cell in column B to be “New”, I can use something like that on the B2 cell (assuming that B1 is the header):

=ARRAYFORMULA(IF( A2:A = “”, “”, “New”))

This will check if A2 to the last created A cell has any content, if its blank, nothing happens but if has anything, the value in B will be New for each valid row.

hope

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 11, 2020, 12:46am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/5 "2020-09-11T00:46:16Z")

</div>

Ah! Thanks! I have like 7 columns, where do I add these formulas?

---

<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 11, 2020, 12:50am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/6 "2020-09-11T00:50:15Z")

</div>

> [@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 …

You can add those in the header.

---

<div class="post-metadata">

**Author:** ![ionamol](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ionamol/32/1951_2.png) [@ionamol](https://community.glideapps.com/u/ionamol)\
**Post date:** [September 11, 2020, 1:12am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/7 "2020-09-11T01:12:07Z")

</div>

You can add the formulas in the header as @ThinhDinh suggested or in the first content row if you already have the content for it (I use this second option but both will work just fine).

BTW, amazing tutorial @ThinhDinh, I really wanted something like that when I was starting (and struggling) to use ARRAYFORMULA!

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 11, 2020, 1:21am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/8 "2020-09-11T01:21:30Z")

</div>

I already have text in the header, so I should create a blank row right under that to add the formula?

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 11, 2020, 1:23am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/9 "2020-09-11T01:23:46Z")

</div>

Oh thx!!

---

<div class="post-metadata">

**Author:** ![ionamol](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ionamol/32/1951_2.png) [@ionamol](https://community.glideapps.com/u/ionamol)\
**Post date:** [September 11, 2020, 1:31am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/10 "2020-09-11T01:31:08Z")

</div>

Usually I just manually add the first row (with the formulas) and the spreadsheet magic do the rest.

---

<div class="post-metadata">

**Author:** ![Jen\_NYCP](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@Jen\_NYCP](https://community.glideapps.com/u/Jen_NYCP)\
**Post date:** [September 11, 2020, 2:06am UTC](https://community.glideapps.com/t/fill-in-columns-as-rows-are-added/15589/11 "2020-09-11T02:06:41Z")

</div>

Thank yoU!
