I am looking for help to revise the code below so that a timestamp is inserted in column AA if I edit cells in columns F-R and another timestamp in column AB cells, only when my colleague edits the cells in columns Y-Z. Currently, my script inserts a timestamp when any cell is edited/added (by any user) in columns A-Z.
function onEdit(e) {
var rr = e.range;
var ss = e.range.getSheet();
var headerRows = 1; // # header rows to ignore
if (rr.getRow() <= headerRows) return;
const sh = e.range.getSheet();
if (sh.getName() == "2022 Agreement Tracker") {
var dt = Utilities.formatDate(new Date(), Session.getScriptTimeZone(), "M/d/yy - h:mm a - ");
var usern = e.user.getUsername();
sh.getRange(e.range.rowStart,27).setValue(dt + user);
}
}