You have a Google Sheet, you’d like a (or all) row(s) to have a date-stamp added whenever an edit is made. That way others you’re collaborating with will know when the row, or the sheet itself, was last updated at a glance.
If you search for this, you’ll find something like this but it needs some tweaks. This is the third time I’ve searched for it, found it, and then had to re-learn what needed tweaking for it to work for me. So I’m saving it here for my posterity and note-keeping.
Date-stamp whenever a row is modified (🔗)
function onEdit(e) {
var sh = e.source.getActiveSheet();
if (sh.getName() !== 'Sheet1' || e.range.getRow() == 1) return; // Skip if we're on another sheet, or not the header row
sh.getRange(e.range.rowStart, 3).setValue(new Date()) // Put the date in column 3
}
See it in action