I've been trying to make the spreadsheet automatically sort some data, and after some searching I found this post: Automatic sorting.

It works just perfect with my permissions as the owner, but when any of my collaborators edit a cell he gets the message You don't have permission for this action.

I found that the problem was that some of the cells in the range to be sorted are "protected" and only I can edit those cells.

So my question is: Is there any way to automatically sort the data and keep the cells protected?

  • Scripts that are published as web applications can run as the spreadsheet owner. So, if you could publish the script as a web application, and persuade your collaborators to visit a URL after each edit, they would be able to run the sorting script. But this is hardly automatic. See developers.google.com/apps-script/execution_web_apps Nov 12, 2013 at 13:40

1 Answer 1


I am fighting with the same problem, I think it is because the protected cells are set statically and not affected by the sort. The reason is that Google Spreadsheets do not allow the selection of multiple ranges with are not adjacent to each other.

In other words, If you have a defined protected range in the Spreadsheet, it will always be the same rows and columns, regardless of your actions (adding rows and columns, sorting them and so on).

This is a huge drawback of the Google Spreadsheets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.