Skip to content

Instantly share code, notes, and snippets.

@johnvilsack
Created August 21, 2019 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnvilsack/ff4a461e86a49e73df4d881728e20fac to your computer and use it in GitHub Desktop.
Save johnvilsack/ff4a461e86a49e73df4d881728e20fac to your computer and use it in GitHub Desktop.
GAS: onEdit Instantiation
// This script runs every time a cell is changed
function onEdit(e) {
var thisSheet = SpreadsheetApp.getActiveSheet();
var editedCell = e.range.getA1Notation();
var editedRow = e.range.getRow();
var editedCol = e.range.getColumn();
var editedA1Col = columnToLetter(editedCol);
// @@ DEBUG
thisSheet.getRange('I10').setValue(editedCell);
thisSheet.getRange('I11').setValue(editedRow);
thisSheet.getRange('I12').setValue(editedCol);
thisSheet.getRange('I13').setValue(editedA1Col);
// @! DEBUG
// Run your custom code below
evalRow(thisSheet,editedRow);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment