Home > Mobile >  Edit a protected column through another column in google sheets
Edit a protected column through another column in google sheets

Time:12-24

I'm the owner of a Google's spreadsheet and have multiple editors. I want that my first column changes (to the actual date) once an editor writes on the second one, but I also wish to avoid that my editors change the values of the first column (by mistake or other), so I want to restrict the access of that first column to my editors.

I used Apps Script to automatically fill the first column once is fill the second one, but I really don't know how to protect my first column in order to make it.

Remark: I think the problem is how to access to the first column only by the second one.

Thanks :)

CodePudding user response:

If you already have an onEdit function working, that's a simple trigger run by whoever is editing the sheet. Meaning that if you protect column A, it won't be editable by that simple trigger because the user won't have permissions

In order to work this out, I encourage you to protect your column as explained here, change your name function or extract in a new function the part about this specific code you're talking about; and set an installable trigger that runs on event. This way it'll be run as you used to but as it came from your own account. As you have permissions for editing ColA the timestamp will be set by the installable trigger but the other user won't be able to edit it since he/she doesn't have the permissions. Try it and let me know!

  • Related