onEdit() doesn’t catch all changes

About your situation, there is a thread. In this thread, Rubén says that

This is a known limitation of onEdit.

About the direct solution of this issue, it is required to wait for Google’s update.

Here, I would like to think of a workaround for your situation. The flow of this workaround is as follows.

This workaround supposes that there are the checkboxes in the range of “F1:F20”.

  1. Check whether the edited range is in “F1:F20”.
  2. If the edited range is in “F1:F20”, retrieve values of “F1:F20” and check each value.
  3. Create an array for putting the result.
  4. Overwite the created array to “F1:F20”.

By this, although it might be not perfect, it can be artificially achieved. Please think of this as just one of several workarounds.

Sample script:

function onEdit(e){
  if (e.range.columnStart == 6 && e.range.columnEnd == 6 && e.range.rowStart <= 20) {
    var ckeckboxRange = "F1:F20";
    var date = new Date();
    var range = e.source.getRange(ckeckboxRange);
    var values = range.getValues().map(function(e) {return e[0] === true ? [date] : [""]});
    range.offset(0, 1).setValues(values);
  }
}

Result:

enter image description here

Note:

  • This is a simple sample script. So please modify this for your situation.

If this was not the result you want, I apologize.

Leave a Comment