Script to lock cell after text entered

57 views
Skip to first unread message

FRANK WEISS

unread,
Feb 8, 2024, 10:43:59 AM2/8/24
to Google Apps Script Community
Hello, I'm an educator and use google sheets for many purposes across the campus. The downside of this is that there are many staff that need access to the sheets I create.  With many staff members entering info, I've had problems of someone accidentally deleting information from a cell after another staff member has already entered info.

I'm looking for a script to protect a cell AFTER an entry has been made. I can protect ranges permanently from others, but need others to have open access initially, then once a cell has data entered (text or numerical), no other staff can overwrite or delete, only me as owner of the sheet.

Any help?!

Andrew Roberts

unread,
Feb 8, 2024, 10:45:35 AM2/8/24
to Google Apps Script Community
Create an installable on edit trigger (pre-authorised to make these changes, whereas a simple trigger may not be able to) that protects the cell when something is entered into it (they'd better get it right the first time :) ) 

Keith Andersen

unread,
Feb 8, 2024, 11:23:11 AM2/8/24
to google-apps-sc...@googlegroups.com

https://youtu.be/o06cKIVjnfM?feature=shared


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8b8b9ee9-6bb8-4e8d-9d62-6539524c1d42n%40googlegroups.com.

FRANK WEISS

unread,
Feb 9, 2024, 2:36:46 AM2/9/24
to Google Apps Script Community
BINGO!! Thank you!
Reply all
Reply to author
Forward
0 new messages