In the Post, I demonstrate how to use the onEdit(e) Function on Google Sheets. This video focuses on the editing of one cell.
How to Video:
Video Notes:
- Legacy Apps Script Editor Used in Video
- Apps Script (Script Editor) is now located under tab ‘Extensions’ instead of ‘Tools’ on Google Sheets
Code in Video:
function onEdit(e) {
var range = e.range;
var spreadSheet = e.source;
var sheetName = spreadSheet.getActiveSheet().getName();
var column = range.getColumn();
var row = range.getRow();
var inputValue = e.value;
if(sheetName == 'ONEDIT' && column == 1 && row == 1)
{
SpreadsheetApp.getActiveSpreadsheet().getSheetByName('ONEDIT').getRange('A2').setValue([inputValue]);
}
}
Related Posts
![](https://codewithcurt.com/wp-content/uploads/2021/04/O-Function-GS-WS-150x150.png)
![On Selection Change Google Sheets](https://codewithcurt.com/wp-content/uploads/2021/03/On-Selection-GS-WS-150x150.png)
![doGet(e) Function Google Script](https://codewithcurt.com/wp-content/uploads/2021/01/doGet-Function-WS-150x150.png)