What I'm looking to do is take my google sheet that contains columns A through N. What I want to do is take the rows, except for row 1 which is a header for all the column, and have them automatically move to the bottom of the same spreadsheet based on the drop down options in column E. Once the option has been selected that signifies it's done I want the entire row to automatically move to the bottom of the spreadsheet. In addition to that I also want column D, which is the due date for the event, to update by adding one year to the date in that column as the new due date will be one year from the previous. Is this possible? Thanks for the help.
function onEdit(e) {
const row = e.range.getRow();
const col = e.range.getColumn();
const as = e.source.getActiveSheet();
if(as.getName() == "Sheet1" && col == 5 && row >1 && !as.getRange(row,col).getValue()=='MPS')
{
const row_new = as.getRange(row,1,1,col);
row_new.copyTo(as.getRange(as.getLastRow()+1,1,1,col));
as.deleteRow(row)
}
}