I set up a time recording sheet in Google Spreadsheets. Now I am trying to achieve a conditional formatting of cells depending on the value of other cells in the spreadsheet:
IF value from cell G2 is greater than 06:30:00 (hh:mm:ss) AND value from cell D2 is smaller than 00:30:00 (hh:mm:ss) OR cell D2 is blank then set background colour of cell D2 to yellow.
IF value from cell G2 is greater than 08:45:00 (hh:mm:ss) AND value from cell D2 is smaller than 00:45:00 (hh:mm:ss) OR cell D2 is blank then set background colour of cell D2 to yellow.
If the conditions aren't met the background colour should be reset to none.
I learned that it is not possible using formulas. Is there an approach doing it in Google Apps Script? I am no scripter but know how to insert snippets and may be able to read and understand if someone would be so nice to explain it to me.
When searching for similar use cases the only reference to Google Apps script I found was this link, a general discussion of its capabilities.
This should be possible by creating an onEdit trigger for a function like this:
More information on triggers can be found here.