Hi,
I would like to automatically add timestamps in the A column every time any cell on a new row is filled (except for row 1 if possible).
I found this formula on wikihow :
/** @OnlyCurrentDoc */
function onEdit(e){
const sh = e.source.getActiveSheet();
sh.getRange ('A' + e.range.rowStart)
.setValue (new Date())
.setNumberFormat ('dd/MM/yyyy');
}
It does pretty much the job, I would just need it to be static, that means that when I come back to modify something on a row, it does not update the timestamp. And I would need to be able to manually modify it after its creation, like if I use a new row today, it will create the cell with 31/03/2023, but I would like to manually change it to let's say 28/03/2023, it does not allow me to do that for now. And if possible exclude the first row.
I hope it is clear, thank you !
I would like to automatically add timestamps in the A column every time any cell on a new row is filled (except for row 1 if possible).
I found this formula on wikihow :
/** @OnlyCurrentDoc */
function onEdit(e){
const sh = e.source.getActiveSheet();
sh.getRange ('A' + e.range.rowStart)
.setValue (new Date())
.setNumberFormat ('dd/MM/yyyy');
}
It does pretty much the job, I would just need it to be static, that means that when I come back to modify something on a row, it does not update the timestamp. And I would need to be able to manually modify it after its creation, like if I use a new row today, it will create the cell with 31/03/2023, but I would like to manually change it to let's say 28/03/2023, it does not allow me to do that for now. And if possible exclude the first row.
I hope it is clear, thank you !