2

In my Google Sheet cell D12 gets the difference of two numbers with =D9 - D4. How do I store the value in cell D12 to a log in another sheet on a daily basis? I would like each row in the log sheet to show the date and the difference. An onEdit() based change tracker will not work for this, because the difference should be save once a day rather than every time the sheet is edited, and because the value I want to track is in a formula cell that is never edited.

2
2

To permanently record a value in a log once a day, you will need a script. The script should read the value in cell D12 and use sheet.appendRow() or similar to append it to a log sheet together with a timestamp. Run the script through an installable trigger that executes once a day.

There is a complete example of how to do this in the appendValuesToArchiveSheet script.

Not the answer you're looking for? Browse other questions tagged or ask your own question.