# Google Sheet Formula gurus I need help

**URL:** https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109
**Category:** Ask for Help
**Created:** [July 26, 2020, 7:02am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109 "2020-07-26T07:02:36Z")
**Posts on this page:** 18
**Page:** 1

<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: [July 26, 2020, 7:02am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/1 "2020-07-26T07:02:36Z")

</div>

**Scenario**

2 work sheets

_Sheet1_ Tasks

**Tasks can be added and deleted**

_Columns_

- Name
- Date
- Email
- Task Description

_Sheet2_ Running Total

_Columns_

- Name
- Email
- Running Total

**Help needed**

Every time a new task is added in the _tasks_ sheet

_Check whether the row exists in sheets2_ identified by email, if not create one.

Then increment the _running total_ column by 1 in the _running total_ sheet.

The task can then be deleted but the running total is preserved.

Any gurus able to provide a solution? I bet you can…

Cheers

---

<div class="post-metadata">

### Author: ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)
#### Post date: [July 26, 2020, 9:31am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/2 "2020-07-26T09:31:13Z")

</div>

Jason,  
I have a way for it to be done using Zapier.

1. Trigger a ZAP when a new row is added to Sheet 1.
2. Find the corresponding record from Sheet 2 using a combination of Name and Email. You may have to create a helper column that combines name and email in both sheets.
3. Update the record to increment the value of Running Total by 1.

Zapier can be task-consuming, so this may not be ideal.

I don’t think it can be done using Formulas in the Sheets. You will have to use Apps Script if you want to do it within Sheets.

---

<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: [July 26, 2020, 9:41am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/3 "2020-07-26T09:41:51Z")

</div>

Thanks good suggestion. I did think about using Zapier but was wanting to avoid using 3rd party solutions 🙂 there must be another way 🙂 😀

---

<div class="post-metadata">

### Author: ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)
#### Post date: [July 26, 2020, 9:52am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/4 "2020-07-26T09:52:08Z")

</div>

What if you didn’t allow actual deletions, but just add a switch to remove the task from the list. This would preserve the spreadsheet entry, but remove it from view in the app.

---

<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: [July 26, 2020, 10:03am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/5 "2020-07-26T10:03:27Z")

</div>

Yeah already do that thanks. Trying to preserve my rows as they are building up quickly even on my pro account. I could condense 1000 rows into 1 if I allow delete. Thanks

---

<div class="post-metadata">

### Author: ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)
#### Post date: [July 26, 2020, 10:11am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/6 "2020-07-26T10:11:27Z")

</div>

What if you used a Query to create a new sheet that only contained items that aren’t marked as deleted and use that sheet for your app instead? Just trying to think of non-Zapier or script methods for you.

---

<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: [July 26, 2020, 10:37am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/7 "2020-07-26T10:37:48Z")

</div>

Ideally I didn’t want to create a new sheet, just want a new row added to other sheet and increment by 1. There must be a way…I’m sure. Thanks for the suggestion though

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [July 26, 2020, 1:34pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/8 "2020-07-26T13:34:57Z")

</div>

I think there will be at some point.

> [@What Actions do you wish Glide had?](https://community.glideapps.com/t/what-actions-do-you-wish-glide-had/12899):
>
> Hi all! At Glide we are starting to think about how we are going to make it possible to make more powerful actions when users are interacting with your app. I’d love to hear about the actions you have been missing in your apps so far. For example: I have an app where I’d like a flag to be set in my users’ profiles when their survey forms have been completed.

Glide has hinted that there will be triggered action functionality in the near future. I imagine that once a new task is created, also add one to Column X could be possible. Until then, a script is your best bet.

---

<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: [July 26, 2020, 1:51pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/9 "2020-07-26T13:51:22Z")

</div>

Thanks, yeah agree script is the way to go. Just got to figure it out…wish me luck (I need it!) cheers 🍻

---

<div class="post-metadata">

### Author: ![adelhammoud](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adelhammoud/32/5587_2.png) [@adelhammoud](https://community.glideapps.com/u/adelhammoud)
#### Post date: [August 1, 2020, 10:16am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/10 "2020-08-01T10:16:43Z")

</div>

Here’s one quick way of doing it with G.S. commands/formulas away from needing google scripting or other tools:

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

Formulas used in Sheet=Running:

In A2 Cell =arrayformula(if(B2:B\<\>"",vlookup(B2:B,Tasks!A:B,2,FALSE),""))  
In B2 Cell =arrayformula(unique(Tasks!A2:A))  
In C2 Cell =arrayformula(if(B2:B\<\>"",countif(Tasks!A:A,B2:B),""))

---

<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: [August 1, 2020, 3:57pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/11 "2020-08-01T15:57:52Z")

</div>

Thank you, I am gonna try and have a go with this on Monday, wish me luck 🙂

---

<div class="post-metadata">

### Author: ![Justin\_Weekley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justin_weekley/32/487_2.png) [@Justin\_Weekley](https://community.glideapps.com/u/Justin_Weekley)
#### Post date: [September 14, 2020, 5:29am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/12 "2020-09-14T05:29:33Z")

</div>

Sounds very possible with some code in app script. Just to make sure I understand you: User submits task name and email address to Sheet2. You want to check if that task/email combo already exists in Sheet1. If it does not, add that info from Sheet2 to Sheet1. Then, what total is it you want to increment? All tasks submitted, identical tasks submitted, or tasks per user submitted? Also, do the tasks have to be deleted? If not, then you basically can just write a function that will compare the lists in each sheet and add any new ones from Sheet2 to Sheet1 and add 1 to the running total each time one is added. I’d be glad to help you write it.

---

<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: [September 14, 2020, 7:18am UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/13 "2020-09-14T07:18:41Z")

</div>

Thanks Justin

Does this explain it any better?

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

---

<div class="post-metadata">

### Author: ![Justin\_Weekley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justin_weekley/32/487_2.png) [@Justin\_Weekley](https://community.glideapps.com/u/Justin_Weekley)
#### Post date: [September 14, 2020, 2:22pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/14 "2020-09-14T14:22:23Z")

</div>

It does. What exactly is the running total counting?

---

<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: [September 14, 2020, 3:30pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/15 "2020-09-14T15:30:31Z")

</div>

The running total of tasks

---

<div class="post-metadata">

### Author: ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)
#### Post date: [September 14, 2020, 3:31pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/16 "2020-09-14T15:31:23Z")

</div>

As far as I understand GS I think the formulae will work on the data which is present inside of the sheet only which means when you delete, there’s no way for the formulae to “remember” what got deleted.  
While with scripts you could do this easily.

---

<div class="post-metadata">

### Author: ![Justin\_Weekley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justin_weekley/32/487_2.png) [@Justin\_Weekley](https://community.glideapps.com/u/Justin_Weekley)
#### Post date: [September 14, 2020, 4:27pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/17 "2020-09-14T16:27:38Z")

</div>

Sorry. Is it a total of all tasks or tasks per user?

---

<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: [September 14, 2020, 6:09pm UTC](https://community.glideapps.com/t/google-sheet-formula-gurus-i-need-help/13109/18 "2020-09-14T18:09:44Z")

</div>

All tasks per user, thanks
