I have 2 columns to enter Lat and Long coordinates in ( E and F ), those also contain the Formulas (for all rows, I just happened to choose row 768below)




Because 75% of the time the full set of Coords can be pasted in D in which case the above seems to work fine in breaking it up into E and F properly or accepting manual input

The problem I'm having is with a script (copy below) that looks for changes in E and F and if so puts today's date in H. With Manual entries in E and F the script works great, with the Cut and Paste into D

however, it only works sometimes (maybe 10%). I could understand it either not working at all (because maybe using a formula not considered an edit?) or working all the time - But why does it work sometimes and/or how to fix it.


function onEdit(e) {
 if ([5].indexOf(e.range.columnStart) != -1) {
 e.range.offset(0, 3).setValue(new Date());
 if ([6].indexOf(e.range.columnStart) != -1) {
 e.range.offset(0, 2).setValue(new Date());

1 Answer 1


Your assumption is correct. Changes in formula only, does not count as "onEdit change".

The onEdit(e) trigger runs automatically when a user changes the value of any cell in a spreadsheet. Most onEdit(e) triggers use the information in the event object to respond appropriately. For example, the onEdit(e) function below sets a comment on the cell that records the last time it was edited. An installable edit trigger runs when a user modifies a value in a spreadsheet.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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