I have a planner type Google spreadsheet where data added daily by 8-10 users. When I add a date to a cell, I want all the cells in the same row after that date to be formatted and added a text value something like "ENDED".
At the moment I am doing it with conditional formatting and with an ArrayFormula to add the text value. The problem is that for the ArrayFormula to work the cells must be empty and in my sheet the cells they might contain data before the "ENDED" date cell.
Is there a way to do this with a script?.... and if the script can handle also the formatting of the cells that will be the best solution.
Here is my sample file to understand better what I am trying to do...
You can do this with a trigger and a custom function.
Create a new apps script project and use this code:
Then, create a trigger to run the
onEdit
function on every edit.In this case there are some hardcoded values:
e.range.getColumn() == 2
for the row where you add the dates onvar colOffset = 3
for the number of columns to skip before reading the datesHope this helps!