Last active
April 28, 2017 12:23
-
-
Save DimuDesigns/50ebd7fe43c999877ffc3207c287c023 to your computer and use it in GitHub Desktop.
onEdit Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onEdit(e) { | |
if (e.range.getA1Notation() == "C3" && e.value != e.oldValue) { | |
var row = 0; | |
while(!e.range.offset(row++,1).isBlank()) {}; // post-increment operator updates row index after its evaluated in the statement | |
e.range.offset(row - 1,1).setValue(new Date()).setNumberFormat('yyyy-MM-dd HH:mm:ss'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment