Edit a cell only with Script
<p>I'm trying to eliminate user error in order to make my sheet sustainable from a maintenance perspective. I built a Google Sheet that is a task tracker which logs which user checked off a task. How do I lock a cell so that it may be edited ONLY by the script (the Effective User (me)), and not by manually inputting data (NOT by the Active User). If someone inputs data into a cell, it becomes not empty, and the log is shifted or otherwise corrupted. I've tried locking the sheet/cells, but then the active user can't log ANY information, even though they're using the script to log it. How can I lock a cell so that it may be edited by the effective user but not the active user?</p>

<p>SEE ATTACHED EXAMPLE:
Column A may be edited by User, which prompts script to fill in columns D and E.
Columns D and E should ONLY be edited by the script; no user should be able to type into those columns.
Columns B and C may not be edited by User, as they must remain the same always.</p>

<p><img src="https://i.stack.imgur.com/lWYLr.jpg" alt="Screenshot of Google Sheet"></p>

<p>Help!</p>

<p>Thanks :)</p>