I'm working on spreadsheet and used the below onEdit function to populate 2 timestamps when cells are edited. However when the cells are pasted into it doesn't trigger the timestamp. Is there any other function the will trigger when cells are pasted into, so when the value changed in a cell?
function onEdit(e) {
const sh = e.range.getSheet();
if (sh.getName() == "BOM" && e.range.rowStart > 1) {
if (e.range.columnStart == 1) {
sh.getRange(e.range.rowStart, 30).setValue(new Date());
} else if (e.range.columnStart == 20) {
sh.getRange(e.range.rowStart, 31).setValue(new Date());
}
}
}