Last active
January 20, 2022 18:36
-
-
Save GitHubKtShoe/ddd6cf162885590521a8eadb10632f35 to your computer and use it in GitHub Desktop.
This will produce a timestamp and a username email in Columns 1 and 2 of any sheet in google Sheets
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) { | |
var row = e.range.getRow() | |
var sh = e.source.getActiveSheet(); | |
var col = e.range.getColumn() | |
var header = sh.getRange(1, col).getValue(); // I know this is var is not right... | |
if (row > 1 && col > 2){ | |
e.source.getActiveSheet() | |
.getRange(row,1) | |
.setValue(new Date());} | |
if (row > 1 && col > 2){e.source.getActiveSheet() | |
.getRange(row, 2) | |
.setValue(e.user.getEmail() )} | |
; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment