# How to Keep Formula While Adding New Lines to Database

**URL:** <https://community.glideapps.com/t/how-to-keep-formula-while-adding-new-lines-to-database/25274>\
**Category:** Ask for Help\
**Created:** [April 7, 2021, 8:55pm UTC](https://community.glideapps.com/t/how-to-keep-formula-while-adding-new-lines-to-database/25274 "2021-04-07T20:55:23Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [April 11, 2021, 11:16pm UTC](https://community.glideapps.com/t/how-to-keep-formula-while-adding-new-lines-to-database/25274/12 "2021-04-11T23:16:39Z")

</div>

> [@Is it possible to do a row to column relation](https://community.glideapps.com/t/is-it-possible-to-do-a-row-to-column-relation/17389/):
>
> How can I relate rows to columns using similar Row IDs in different worksheets, Id like to do this because I have a sheet calculating lists but I won’t be able to view a specific inlist if it cannot relate to another string of data in a different sheet

If I’m correct, we did talk about the same thing here.

Your structure is weird. I believe a better way to do this is to have your rowIDs in the Panel list as one single column.

Let’s say:

Cabinet ID | Panel ID | Row ID | Quantity

Then in the second sheet have three columns

Row ID | Panel ID | Quantity

Then the quantity column can be derived using a rollup inside Glide on top of a relation, or an easier query inside the Sheet.

---

_[View the full topic](https://community.glideapps.com/t/how-to-keep-formula-while-adding-new-lines-to-database/25274)._
