# Group and Store Column Data

**URL:** <https://community.glideapps.com/t/group-and-store-column-data/17874>\
**Category:** Ask for Help\
**Created:** [November 2, 2020, 10:50pm UTC](https://community.glideapps.com/t/group-and-store-column-data/17874 "2020-11-02T22:50:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [November 2, 2020, 10:50pm UTC](https://community.glideapps.com/t/group-and-store-column-data/17874/1 "2020-11-02T22:50:39Z")

</div>

Hi Gliders!

I have a column that rounds up gold coins based on what users spends on, and this data is used to calculate the total gold users have remaining.

Issue is, the data is created in a registration form sheet, which I need to reset once in two days, so I don’t use up all rows, but I want this column data to be saved in another sheet, gold spent needs to be group as per user email and total sum spend must come in single row for that user. I can then use that value to calculate users final total gold, rather than from registration form sheet.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b58d5ebf74f5c359bcd49834fab96777d2c03537.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e360e969fd92d48c23b347c08772894d1b3bf5ab.png)

---

<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 2, 2020, 11:05pm UTC](https://community.glideapps.com/t/group-and-store-column-data/17874/2 "2020-11-02T23:05:05Z")

</div>

I had this problem a while back, what I did is use Query to group and sum current week’s data, then every weekend I use a script to hard-code it into a separate file I use solely for historical data storage purpose.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [November 3, 2020, 8:02am UTC](https://community.glideapps.com/t/group-and-store-column-data/17874/3 "2020-11-03T08:02:14Z")

</div>

I wish i knew how to do that ☹

Any easier way to do this ?

---

<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 3, 2020, 8:11am UTC](https://community.glideapps.com/t/group-and-store-column-data/17874/4 "2020-11-03T08:11:25Z")

</div>

Hope others can chime in, I can’t think of another way.

Here are my tutorials for Query.

> [@Tutorial - QUERY: "The most powerful function" in Google Sheets (part 1)](https://community.glideapps.com/t/tutorial-query-the-most-powerful-function-in-google-sheets-part-1/10432):
>
> This topic was inspired by our last community meetup, in which we talked about some formulas in Google Sheets and some people want to know more about QUERY, which was branded [“The most powerful function in Google Sheets”](https://www.benlcollins.com/spreadsheets/google-sheets-query-sql/) by famous GSheets teacher Ben Collins. So, what is QUERY, and why is it so powerful. Here’s a writeup on it, which hopefully would help many of you here in this community. Trust me, it would change so much how many of you “clean” your data in the future from raw data, in a very…

> [@Tutorial - QUERY: “The most powerful function” in Google Sheets (part 2)](https://community.glideapps.com/t/tutorial-query-the-most-powerful-function-in-google-sheets-part-2/10849):
>
> If you have not read part 1, below is the direct link so you can have a read at what QUERY is, and how it can help your case, whether it be building Glide apps or make your normal day work easier. 
> 
> > **6/Dynamically sort your data using ORDER BY**
> >
> > An ORDER BY claused can be used to dynamically sort your data after being queried, and you can change the column that is used to sort with just a letter. By default, the ORDER BY sorts ascendingly, and it can grab the data type in the column automatically.…

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [November 3, 2020, 2:58pm UTC](https://community.glideapps.com/t/group-and-store-column-data/17874/5 "2020-11-03T14:58:46Z")

</div>

So…why not have another google sheet that pulls the data from this one at the end of every day and stores it, use this sheet to lookup the information from the other sheet to gather the quantity? You would have the non glide sheet use the IMPORTRANGE function then run a script on a timer at the end of the day that copies that data over so its static and no longer dynamic. That data is summed up so you have a total. Your glide sheet uses same IMPORTRANGE function and pulls total, you just simply use a vlookup that matches names to their gold quantities. now you have infiniti rows and when the sheets are closed and the google servers are handling the load its instantaneous.
