I have the following code which is for tracking the date of any edit made in a particular row. However, this code applies to the whole spreadsheet file, I would like to change this to be for the 1st sheet only which is titled "Deals List". Can anyone help please?
function onEdit() {
var dateColNum = 7 //column G
var ss1 = SpreadsheetApp.getActiveSpreadsheet();
//set date in same row as edit happens, at fixed column
ss1.getActiveSheet().getRange(ss1.getActiveRange().getLastRow(), dateColNum, 1, 1).setValue(new Date())
}
Best Answer
Add something like the following
If by "first sheet" you mean one specific sheet no matter the sheets order
or
If by "first sheet" you mean that the sheets' order matters