How to lock cells in Google Sheets
There are three ways. They differ in one thing: whether a collaborator who means well can still overwrite your formula.
1. Protected range (built in)
- Select the cells.
- Right-click > View more cell actions > Protect range (or Data > Protect sheets and ranges).
- Click Set permissions, pick Restrict who can edit this range, choose Only you.
Strongest option: other editors simply can't type in those cells. The catch: you have to manage it range by range in a side panel, nothing on the sheet shows which cells are protected, and when you add new formulas you have to remember to add new ranges.
2. Warning-only protection
Same panel, but pick Show a warning when editing this range. Editors get a pop-up and can click OK anyway. Good for honest mistakes; useless once people learn to click OK.
3. Restore-on-edit (script)
A small Apps Script keeps a copy of the locked cells. When someone else changes one, the script puts the original back and logs it. This is what FormulaLock does, together with options 1 and 2 and a visible yellow fill so people can see what is locked.
Which one should I use?
Need a hard block for a few cells: option 1. Shared working sheet where people keep pasting over formulas: options 2 + 3 together, so edits still flow everywhere else and the formulas come back on their own.
What none of these do: hide data. Anyone who can view the sheet can see and copy every formula. See limits.