Picture of the cells- google sheet I have a cell in my google sheet that changes color base on a text, and it is refreshing every minute. I would like to have a timer tracking the number of minutes this cell is red.
As the color change over the day, is it possible to sum (or add up the minutes) every time the cell is red and have a total value per day?
I have no function for the timer. The information in "time" column are pulled from a website via xmlimport.
It is completely new area for me. Let me know if it's unclear. Thanks for your help
A JavaScript Timer for Collecting Time and Color of A Single Cell
While this is probably not exactly what you want, I suspect it has all of the components for you to figure out how to get what you want.
datatimer.html
This is Javascript Timer that I've used several times for different things and I adapted it to this function for you to use as an example to help you realize your goal.
Code.gs:
An image of the timer module in the sidebar:
This is just a little test setup that checks on the color of cell A1 every minute or whatever you select. You can start the timer, stop the timer, do a single ping any time you want. The timers calls a function called changeData() and that generates a time string and reads the background color of ColorChange!A1. It the returns that information to the client and calls a client side function to save the data in a sheet named "Data".
This is what the Data sheets looks like after a few samples and single pings.