In Google Sheets I have a column that needs to be updated with the current date & time every time another cell in the same row is updated, but skip the top row which is the header. I found this script from a YouTube video that works great except it updates the entire column. I either need it to exclude the top row or start on row 2 or specify which row to start on if I decide to add more header rows at the top.
I am not a programmer at all, so any help is greatly appreciated.
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveCell();
if( r.getColumn() != 2 )
{
var row = r.getRow();
var time = new Date();
time = Utilities.formatDate(time, "GMT+05:30", "dd/MM/yyyy, hh:mm:ss");
SpreadsheetApp.getActiveSheet().getRange('I' + row.toString()).setValue(time);
};
}