onEdit(e)
which is used for the Edit event on Spreadsheet has the old value as e.oldValue
. The specifications for this are as follows.
- When an user edited a single "A1" cell,
e
ofonEdit(e)
showshoge
fore.oldValue
andfuga
fore.value
. - When an user edited the "A1:A2" multiple cells,
e.oldValue
ande.value
ofonEdit(e)
are not shown anything. - When an user copied and pasted from other cell,
e.oldValue
ande.value
ofonEdit(e)
are not shown anything.
This sample script was created to retrieve both the edited values and the old values for the range of edited cells. This is the modified e.oldValue
.