To lock cells in Google Sheets, open the spreadsheet in a web browser, select the cells, then choose Data > Protect sheets and ranges and set who can edit them. To unlock them later, remove their protection in the same sidebar. Protection helps prevent accidental or unauthorized edits; it does not hide the cells or make their contents confidential.
This guide covers protecting a range, protecting a whole sheet while leaving selected cells editable, and removing protection. It applies to Google Sheets in a web browser. Excel uses a different protection workflow, so its instructions and settings do not transfer directly.
What You’ll Need
- A Google account with permission to edit the spreadsheet. If you only have view access, you cannot create or change protections.
- A web browser with the spreadsheet open in Google Sheets. The menu path below is for the browser version.
- A clear idea of which cells should stay editable and who should be allowed to change protected cells. If you are protecting a whole sheet, note any cells that collaborators should still be able to edit.
Step-by-Step
- Open the protection controls. Open the spreadsheet and select Data > Protect sheets and ranges from the menu. A sidebar opens on the right. If it already lists existing protections, you can inspect or edit those entries there; otherwise, choose Add a sheet or range to create a new protection.
- Choose whether to protect a range or a sheet. To lock just a few cells, use the Range option. To protect the full worksheet tab, choose Sheet. These options control different areas: a range protection affects only the cells you specify, while a sheet protection covers the sheet unless you make exceptions. Give the protection a useful description, such as Budget formulas or Inventory headings, so it is easy to recognize later.
- Select the cells for a range protection. If you chose Range, check the range shown in the sidebar. You can select the cells in the grid first and then open the protection controls, or enter a reference directly, such as
B2:D20. For a range on a particular tab, make sure the selected sheet name is correct. Use the grid to check that the selection includes every cell you intend to protect and does not include input cells that collaborators need to change. - Set up a sheet protection and any exceptions. If you chose Sheet, confirm the sheet name in the sidebar. To keep particular cells editable, turn on Except certain cells and specify those cells or ranges. For example, protect a form sheet but leave the response area B2:B30 as an exception. Check the exception references carefully: an exception is an area left out of the protection, not an additional locked range.
- Choose how strict the protection should be. Select Set permissions. In the permission options, choose to restrict who can edit the protected range or sheet. Depending on the protection type, you can limit editing to yourself or choose specific people under the custom option. Add only people who should be able to change the protected cells, then confirm the choice. People not permitted to edit that area will be stopped when they try to change it, although they may still be able to edit unprotected cells in the spreadsheet.
- Decide whether you want a warning instead. If you want to remind editors to be careful but do not need to block edits, choose the warning option, where available, rather than restricting who can edit. A warning appears when someone tries to change the range, but the person can proceed. Use a restriction for formulas or important labels that must not be changed by ordinary collaborators; use a warning for cells where edits are allowed but deserve attention.
- Save and verify the protection. Confirm the permission settings and check that the protection appears in the sidebar. If practical, test the result with a collaborator who does not have permission to edit the protected area, or ask them to check it. Do not remove your own access just to test: keep an owner or authorized editor able to correct the settings. Verify both sides of the setup: a protected cell should be blocked or show the warning you chose, while intended input cells should remain editable.
- Unlock a protected range or sheet. Open Data > Protect sheets and ranges again, then select the relevant protection in the sidebar. Check its description and range or sheet name before changing it. Choose the trash can or remove-protection control in the sidebar and confirm if prompted. This removes that protection; it does not delete the cells, their contents, or the spreadsheet. If you protected a sheet and also created separate protected ranges, remove each protection you no longer need.
- Check access separately from protection. Cell protection does not add people to the file or change their general sharing role. If someone needs to edit the spreadsheet at all, use the spreadsheet’s sharing controls to give them appropriate access. Conversely, removing a cell protection does not change a person’s access to the rest of the file. Review sharing and protection as separate settings when a collaborator cannot make the changes they need.
Common Mistakes
- Choosing a warning when you meant to block edits. A warning is only a reminder. Editors can dismiss it and make the change. For a firm restriction, choose the option that limits who can edit and set the permitted editors.
- Protecting the wrong area. A range reference can be off by a row or column, and sheet protection can cover much more than expected. Recheck the range and tab name in the sidebar before saving. If collaborators need to fill in certain cells on a protected sheet, list those as exceptions rather than assuming they will remain editable.
- Assuming protection hides information. Protected cells remain visible to people who can view the spreadsheet. Protection is not a password, encryption, or a way to keep confidential data secret. Do not put private information in a shared file merely because a range is protected.
- Expecting protection to control file sharing. A protected range does not change who can open, view, copy, or otherwise access the file according to its sharing settings. Review the spreadsheet’s sharing access when the issue is who can see or access the document, not who can edit a particular cell.
- Removing the wrong protection. The sidebar can contain several entries with similar names. Check each entry’s description and range before removing it. Deleting one protection does not necessarily remove other protections that overlap or cover the same sheet.
Tips
- Protect formulas, not every cell by default. In a shared calculator, for example, protect the formula cells and leave the cells where people enter assumptions editable. This lets collaborators use the sheet without accidentally overwriting its calculations.
- Use clear descriptions. Name protections after their purpose, such as Do not edit – totals or Staff input area. This makes it easier to identify the right item in the sidebar when you need to update permissions or unlock a range.
- Plan a protected-sheet layout. If most of a tab should not change, protect the sheet and add exceptions for the intended input cells. If only a few cells need guarding, protect those ranges instead. Keeping the design simple makes it easier to explain to collaborators.
- Review permissions when the team changes. When a collaborator’s role changes, revisit custom editor lists for protected ranges as well as the file’s general sharing settings. Removing someone from a custom protection list and removing them from the file are different actions.
- Keep a record of important setups. For a busy shared sheet, document which tabs or ranges are protected and who is expected to edit them. This small note can help another editor maintain the spreadsheet without accidentally weakening protections.
Troubleshooting
The protection option is missing or unavailable. Confirm that you have edit access and that you opened the file in Google Sheets in a browser. A viewer cannot set protection. If the file belongs to someone else, ask its owner or an editor with the necessary access to create or change the protection.
A collaborator can still change a cell. First check whether the protection is set to show a warning rather than restrict editing. Then select the protection in the sidebar and confirm the range, sheet, and permitted editors. If the cell is an exception on a protected sheet, it is intentionally left editable. Also check whether the collaborator is included in the custom editor list or has another level of access that permits the change.
A collaborator cannot edit cells that should be open. If the whole sheet is protected, confirm that the cells are listed as exceptions and that their references are correct. If a separate range protection also covers those cells, adjust or remove that overlapping protection. Ask the collaborator to refresh or reopen the spreadsheet after you change the settings.
You cannot find the protection to remove. Open the protection sidebar and inspect each listed entry; descriptions may not match the cell content. Select an entry to see whether it applies to a range or a sheet, and check the tab and cell references. Remove only the entry that matches the protection you intend to undo. If you still cannot change it, ask the spreadsheet owner to review the settings.
Someone can see the cells despite the lock. That is expected: protection controls editing, not visibility. If a person should not see the data, do not rely on hiding a tab or protecting cells. Review who can access the file and store sensitive information in a file that is shared only with the intended viewers.
Frequently Asked Questions
Can I lock only certain cells in Google Sheets?
Yes. Choose Data > Protect sheets and ranges, add a range, and set its editing permissions. You can also protect a whole sheet and leave specific cells editable as exceptions.
Can I lock a sheet but let people edit a few cells?
Yes. Add a sheet protection, enable Except certain cells, and enter the ranges that collaborators should be able to edit. Check those references before saving, since the exception cells are not protected by that sheet rule.
Can I protect cells with a password?
No. Google Sheets protection uses account-based editing permissions and does not provide a password for unlocking a range. It also does not encrypt or conceal the protected cells.
Can viewers edit a protected range?
No. Viewers cannot edit the spreadsheet. They need appropriate file-level edit access before range or sheet permissions can allow them to change cells.
Does protecting cells stop people from copying the data?
No. Protection is intended to control editing, not to prevent viewing or copying. Use sharing settings to limit file access, and do not store sensitive information in a spreadsheet shared with people who should not see it.
How do I unlock cells without deleting their contents?
Remove the relevant protection from the sidebar opened with Data > Protect sheets and ranges. The cells and their contents remain in place; only the editing restriction or warning is removed.
Related
- How to Clear Cache Data in Outlook
- How to Create a Company Email Signature in Outlook
- How to Create a Cool Signature in Outlook
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Make a Monthly Budget in Google Sheets Step by StepTo make a monthly budget in Google Sheets, create separate income and expense tables, enter planned and actual…
- What Are Progress Dots Called in Apps and Websites?The dots used to show movement through screens or steps are generally called progress indicators or progress dots.…
- How to Export Group Contacts in Outlook as a CSVTo export Outlook group contacts, first identify whether you have a classic Outlook Contact Group or a Microsoft…
- How to Change HTML Email View and Settings in OutlookTo make Outlook compose messages in HTML, change the default message format: in classic Outlook for Windows, go…
- Add Page Numbers in Microsoft Word 365To add page numbers in Word 365 on Windows, open the document, select Insert > Page Number, choose…
- How to Share a Custom Calendar in Microsoft OutlookTo share a custom calendar in Outlook, select the calendar, open its sharing controls, add the recipient’s email…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.