function onEdit(e) {
let range = e.range;
let oldCellValue = e.oldValue;
let mainCellRow = range.getRow();
let mainCellCol = range.getColumn();
let mainCellValue = range.getValue();
let sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
//The command below is to force the focus to the cell where you are typing the value.
//everytime you finish typing the cursor return to the cell A2.
range.activate()
let lastRow = sheet.getLastRow()
//The lines below is to assure that your log will be saved in the right order.
//I included a column to save the date of each edition.
if (mainCellRow == 2 && mainCellCol == 1 && mainCellValue != "")
{
if ( sheet.getRange(lastRow,2).getValue() === "")
{
sheet.getRange(lastRow,2).setValue(oldCellValue)
sheet.getRange(lastRow,3).setValue(new Date())
}
else
{
sheet.getRange(lastRow+1,2).setValue(oldCellValue)
sheet.getRange(lastRow+1,3).setValue(new Date())
}
}
}