I have a sheet with 5 tabs, Called Adam, Bob, Cheryl, Dave, Earl where I want to add a permanent timestamp in column R
the FIRST time a cell in column F
is edited.
function onEdit(e) {var col = e.range.getColumn();if(col == 6) {e.source.getActiveSheet().getRange(1,2).setValue(new Time())function onEdit(e){/* Using a conditional operator to assign the active sheetwhen this function is ran without providing an event object, i.e.when running from the script editor */const sheet = e ? e.range.getSheet() : SpreadsheetApp.getActiveSheet();if(sheet.getName() === 'TBD'){sheet.getRange('R4').setValue(new Time()); } }
Is what I tried. for some reason it adds the timestamp in column V
, and it's only good for a single timestamp , which was supposed to be in column R
cell 4. I need every row to have its own timestamp, I am expecting as many as 500 rows per tab