Skip to content

Instantly share code, notes, and snippets.

View 8bu's full-sized avatar
🌄
Dawning

LONG 8bu

🌄
Dawning
  • undefined
  • void
View GitHub Profile
function onEdit() {
// Re: https://productforums.google.com/d/topic/docs/gnrD6_XtZT0/discussion
//
// This script prevents cells from being updated. When a user edits a cell on any sheet,
// it is checked against the same cell on a helper sheet, and:
//
// - if the value on the helper sheet is empty, the new value is stored on both sheets
// - if the value on the helper sheet is not empty, it is copied back to the cell on
// the source sheet, undoing the change
//