To lock specific cells in Google Sheets, select the cells, choose Data > Protect sheets and ranges, then set who is allowed to edit them. This protects the selected range while leaving the rest of the sheet editable. You need edit access to change protection settings, and the instructions below are for Google Sheets in a web browser.
What You’ll Need
- A Google account with edit access to the spreadsheet. Viewers and commenters cannot set or change protected ranges.
- The spreadsheet open in a desktop web browser. Google Sheets menus and protection controls are easiest to use in the browser; the mobile app may have fewer options.
- A clear idea of which cells should be protected and which collaborators, if any, should still be able to edit them.
Step-by-Step
- Open the spreadsheet and identify the cells. Go to Google Sheets and open the file. Find the cells that need protection. For example, if a worksheet has a pricing table, you might protect the formula cells in column D while leaving the quantity cells in column C editable. Note the range using its column letters and row numbers, such as
D2:D25. - Select the range you want to protect. Click the first cell, then drag to the last cell in the range. You can also click the name box to the left of the formula bar, type a range such as
D2:D25, and press Enter. Check the highlighted cells before moving on: selecting the header or an entire column by mistake can protect more than intended. - Open the protection panel. From the menu, choose Data > Protect sheets and ranges. A side panel opens on the right. If it does not show a range automatically, click Add a sheet or range, then select Range and enter the cell address in the range field. Make sure the spreadsheet tab name and range are correct.
- Optionally add a description. Type a short label in the description field, such as “Formula cells—do not edit.” This does not change the protection, but it helps you and other spreadsheet editors recognize why the range is restricted when they review protection settings. Descriptions are particularly useful when a workbook contains several protected sections.
- Choose to set permissions. Click Set permissions. In the permissions dialog, choose Restrict who can edit this range if you want to prevent edits. The other option, Show a warning when editing this range, only displays a warning; it does not lock cells or stop someone from continuing with an edit.
- Decide who can edit the protected cells. Choose Only you to limit editing to your account, or choose the custom option to allow specified people. Depending on the dialog, you may be able to select editors from the list or add people by account. Confirm the permitted editors carefully, then click Done or the confirmation button shown. The protection applies to the selected range.
- Test the result. Click one of the protected cells and try to change its contents. If you are the owner or an allowed editor, Sheets may still let you edit it, so your own account is not a reliable test of what other people can do. To check a collaborator’s access, review the permissions in the protection panel or ask an editor who is not on the allowed list to verify the restriction. Avoid changing important data just to test it.
- Keep the other cells available for entry. Protecting a range does not automatically protect the rest of the sheet. Cells outside the range remain editable by people who have edit access to the spreadsheet, unless they are covered by another protection rule. If you later insert rows or change the layout, revisit the protected range and confirm it still covers the intended cells.
If you need to protect several separate areas, create a separate protected range for each area. For example, protect B2:B10 and F2:F10 in two entries rather than accidentally selecting the large rectangle between them. Use the side panel to review, edit, or remove those entries later.
There is also a useful reverse arrangement: protect an entire sheet but leave particular cells open for input. In Data > Protect sheets and ranges, add a sheet protection, choose the sheet, and use the option to exclude certain cells or ranges. Enter the exceptions in the field provided, then set permissions for the rest of the sheet. This is often simpler for a form or template where most cells should stay fixed and only a few input cells should remain editable. Check the exception range carefully before saving.
Common Mistakes
- Choosing a warning instead of a restriction. The warning setting is a reminder, not a lock. If you need to stop unauthorized edits, choose Restrict who can edit this range and set the permitted editors.
- Assuming protection hides information. Protected cells are not private or concealed. People who can view the spreadsheet may still see the contents, and spreadsheet editors may be able to copy information. Do not use range protection to store passwords, confidential records, or information that a collaborator should not see.
- Selecting too much or too little. A range such as
D2:D25protects only those cells, not the entire column. If new rows are added below row 25, they may not be covered. Conversely, choosing the whole sheet can prevent collaborators from entering data where you intended them to work. - Expecting a password prompt. Google Sheets protection is based on account permissions, not a password for an individual cell. You cannot set a separate password that collaborators enter to unlock a range.
- Forgetting that spreadsheet access still matters. Protection controls editing of the selected cells; it does not give someone access to the file. Share the spreadsheet with the appropriate viewer, commenter, or editor role separately, and avoid giving edit access to people who do not need it.
- Thinking that the owner will be blocked. The file owner and permitted editors can still change protected content. This is expected. Protection is intended to prevent edits by people who are not authorized for that range, not to make the cells permanently immutable.
Tips
- Protect formulas, not every cell by default. In a shared calculator or tracker, identify formula cells and protect those while leaving input cells open. This reduces accidental overwrites without making ordinary data entry difficult.
- Use clear protection descriptions. Labels such as “Do not edit—calculated totals” or “Manager entry only” make the protection panel easier to maintain. A description is especially helpful when someone else will manage the spreadsheet later.
- Plan for new rows. If collaborators regularly add rows, decide how those rows should be protected. You may need to update the protected range when the table grows, or protect the appropriate sheet area and define editable exceptions instead.
- Review permissions when collaborators change. If a person leaves a project or no longer needs access, review both the spreadsheet’s sharing settings and any custom protected-range permissions. Removing a person from one list does not necessarily remove their access to the file itself.
- Keep a clean input workflow. Use headings, notes, or cell formatting to show collaborators which cells are intended for entry. Protection prevents certain edits, but visible instructions can reduce confusion before someone reaches a protected cell.
- Remember that Google Sheets is not Excel. This guide uses Google Sheets in a browser, where the path is Data > Protect sheets and ranges. Excel has its own worksheet-protection controls and workflow, so instructions for one program should not be assumed to match the other.
Troubleshooting
The protected cell still lets me edit it. Check whether you selected Show a warning when editing this range instead of restricting editors. Then open Data > Protect sheets and ranges, select the protection entry, and review its permissions. If you are the spreadsheet owner or an allowed editor, being able to edit the cell may be normal. Test with an account that is not allowed to edit, if available.
I cannot find the protection menu or set permissions. Confirm that you have edit access and are using Google Sheets in a web browser. A viewer or commenter cannot create or change protections. If you have edit access but the control is still unavailable, reload the file, check that you are in the correct spreadsheet, and ask the owner whether your account has been restricted from managing the relevant range.
The wrong cells are protected. Open the protection side panel and click the entry that appears to cover the wrong area. Verify the sheet name and range address. Edit the range field to the correct cells, or remove that protection entry and create a new one. Take care not to delete a different rule that protects an important section.
A collaborator can still edit the cells. Check that the collaborator is not included among the allowed editors, either directly or through the permission option selected for the range. Also verify that the person is using the account you intended to restrict; people sometimes have more than one Google account. If the setting only displays a warning, change it to a restriction.
New rows are not protected. Your range may end at a specific row, so rows added below it fall outside the protection. Reopen the panel and expand the range to include the new rows, or consider protecting the sheet and specifying the cells that should remain editable. Test the adjusted setup before relying on it for future entries.
I need to prevent someone from seeing the content. Range protection is not a confidentiality feature. Change the spreadsheet’s sharing access, remove that person if appropriate, or keep sensitive material in a separate file with limited access. Anyone who can open a spreadsheet may be able to view content even when they cannot edit protected cells.
Frequently Asked Questions
Can I lock only some cells and leave the rest editable?
Yes. Select the cells you want to protect and set a restricted editor list for that range. Other cells remain editable for spreadsheet editors unless another protection rule covers them.
Can I lock cells in Google Sheets with a password?
No. Google Sheets uses account-based permissions for protected ranges; it does not offer a separate cell password. Control access through the spreadsheet’s sharing settings and the range’s permitted editors.
Can collaborators still see protected cells?
Yes. Protection restricts who can edit; it does not hide the cells or encrypt their contents. Use sharing permissions or a separate restricted file if someone should not see the information.
Can I protect a whole sheet but leave a few cells editable?
Yes. Add a sheet protection from Data > Protect sheets and ranges, then specify the cells or ranges to exclude using the sheet protection options. The remaining sheet area can be restricted according to the permissions you set.
Why can I edit a range I protected?
You may be the owner or an allowed editor, or you may have set a warning rather than a restriction. Review the protected-range entry and its permission choice. A collaborator who is not permitted to edit is a better test than the account that created the rule.
Can I protect more than one range?
Yes. Add separate protection entries for each nonadjacent range, then set the permitted editors for each one. Review the entries in the side panel if you later need to update or remove a restriction.
Related
- Clear Calendar Cache in New Outlook: Step-by-Step
- Clear Email Address Cache in Outlook: Step-by-Step
- Clear Cache in Outlook for Windows 10: Step-by-Step
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Word Styles: How They Work and When to Use ThemMicrosoft Word styles are saved sets of formatting that you can apply to text or paragraphs, such as…
- Excel Shortcut to Go to the Bottom of a Data ColumnIn Excel for Microsoft 365 on Windows, press Ctrl+Down Arrow to jump to the bottom edge of the…
- Delete a Scheduled Email in OutlookYes. In new Outlook or Outlook on the web, open the scheduled message in Drafts, choose Cancel send,…
- Remove Formatting in Microsoft Word: Step-by-StepTo remove formatting in Microsoft Word, select the text, then choose Home > Clear All Formatting in the…
- Excel Group Rows at Multiple Levels: Steps and TipsYes. In Excel for Microsoft 365 on Windows, you can group rows in nested levels: select a set…
- Excel Date and Time Shortcuts: Insert Both InstantlyIn Excel for Microsoft 365 on Windows, press Ctrl+; to insert the current date, or Ctrl+Shift+; to insert…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.