Script apply formula to sheets when née cell data is added

Trying to find a way to add a working formula to a cell as the data gets added in.

I can add the formula to all the cells in the column however it creates a “0” and app will display erroneous data as a result.

I think a script could handle it however I’m doing my best to learn glide and sheets on top of that.

Thanks for any direction to learn more about it.

A direct answer to your question is to use an arrayformula.
But… do you actually need the result of the formula in the Google Sheet, or will it just be used in your app?
If you don’t need it in the sheet, then you are much better off performing the calculation in Glide using computed columns.

2 Likes

Thanks for that. So make the calculation on the app versus the spreadsheet?

I’ll have to play around with it to try and make it work. But sounds like transpose the calculation and display the result.

Yes, do the calculations using Glide computed columns. If you need some help with that, just ask.

1 Like

Thanks Darren…here is what I have.

=SUMIFS(Priorities!D:D,Priorities!E:E,A2,Priorities!A:A,B2)

This is what the Sheets formula looks like…i didn’t create it. I think it’s a simple addition of results on othe tables.

Just picking this up so I am still struggling to make sense of the “How to do it”

Could you provide a screenshot of the associated Google Sheet, that shows the column headings for columns A through E?

You should be able to create a template column in both the Weeks table and the Priorities table that joins the Creator column value to the Week Name column value. Then create a relation column that links the template in the Weeks table to the template in the Priorities table. Finally create a Rollup column that uses the relation to sum the matching values from the Priority Minutes column.

2 Likes

Thanks @Jeff_Hager. I think i need to adjust this a bit, because I am getting a total count of unique week names.

I think I still have a gap between what i have and what I am hopoing to create.

Probably in your rollup column you should switch the operation from count to sum.

1 Like

@Eric_Penn …that is insane you knew that…looks like a winner!

3 Likes