3

I am very new to using Google App Script.

I am working on a Google Spreadsheet that will be edited by multiple users in our office. The spreadsheet is a schedule of order due dates. The information changes frequently (due dates are moved, new orders are added).

We would like to make it obvious when data has changed. I thought that changing the color of the cell would work as a good solution. However, I want the cell color to change back to white after some time as passed (a few hours, definitely no more than a day). I'm just looking for a temporary visual cue.

In a phrase: I want the background color of a cell to change each time the value of the cell is changed, but I want it to change back to white after a certain amount of time has passed.

Can this be done?

The closest solutions I found through searching is here:

How to change a google spreadsheet row color, when a cell in the row is edited?

That appears to change the entire row's color when a cell is edited, but it does not change the color back later.

That question also references another that tries to accomplish something similar: Google Spreadsheet: Script to Change Row Color when a cell changes text;

Thanks.

Community
  • 1
  • 1

1 Answers1

1

Yes its doable. Store your coloring actions somewhere like scriptDb. Install a hourly trigger that reverts the old actions by querying for timestamp less than your limit (say new Date().getTime-1000*60*60*8 for older than 8 hours)

Zig Mandel
  • 19,571
  • 5
  • 26
  • 36