Yes. In Excel, mark cells as locked or unlocked, then protect the worksheet for the setting to take effect. In Google Sheets, select a range or sheet and use Data > Protect sheets and ranges to restrict who can edit it. Both tools can keep ordinary collaborators from changing selected cells, but neither feature should be treated as a way to secure confidential data.
What “locking cells” actually means
Cell locking is a rule about editing, not a way to encrypt a cell or conceal its contents. It is useful when a spreadsheet has both fixed information and places where someone should enter data: for example, a budget template with formulas that calculate totals and blank cells for monthly expenses.
The two programs implement the idea differently. Excel gives each cell a Locked setting, but that setting only blocks edits after you protect the worksheet. Google Sheets lets you protect a selected range or an entire sheet and choose which collaborators can edit it. In either program, protection is mainly a guardrail against accidental or unauthorized changes by spreadsheet editors—not a substitute for carefully controlling access to the file itself.
How cell locking works in Excel
In Excel for Microsoft 365 on Windows, cells are marked Locked by default. That does not stop editing while the sheet is unprotected. The lock becomes active only when you choose Review > Protect Sheet. This default explains a common surprise: protecting a new worksheet may prevent users from changing nearly every cell, even if you had not individually locked anything.
To make a form where only certain cells can be edited, leave the cells that should not change locked, unlock the input cells, and then protect the sheet. For example, in an expense template, you might unlock cells where staff enter dates and amounts while leaving category labels and total formulas locked.
If you instead need to lock only a few cells and leave most of the sheet editable, first unlock the whole sheet, then lock the chosen cells. A worksheet’s protection options can also control whether users may select locked or unlocked cells, format cells, sort, or use other actions. Those options affect what people can do while the sheet is protected; they do not change the underlying values.
Excel: set up editable and protected cells
- Choose the cells people may edit. Select the input cells, such as the blank cells for names, dates, or amounts.
- Open the cell settings. Press Ctrl+1 on Windows to open Format Cells, select the Protection tab, clear the Locked checkbox, and choose OK. On Excel for Mac, Command+1 opens Format Cells; the Protection tab is also available there.
- Protect the worksheet. Choose Review > Protect Sheet. Select the actions you want to allow, such as selecting unlocked cells. You can set a password, but it is optional.
- Check the result. Try changing an input cell and a formula or label cell. The input should remain editable; the protected cell should not.
Because Excel marks cells Locked by default, you do not have to lock formula cells one by one if the worksheet has never been unlocked. If you are starting with a sheet where everything should be editable except a few formulas, select the entire worksheet, open Format Cells > Protection, clear Locked, and then select the formula cells and mark them Locked. Protect the sheet afterward. Be careful when selecting the whole worksheet: verify the selection before changing the setting.
When you protect a sheet, Excel may ask you to confirm a password if you chose to use one. Keep it somewhere appropriate; a forgotten sheet-protection password can make routine changes difficult. Excel for the web may offer a different set of protection controls from the Windows desktop app, so use the desktop app if you cannot find a setting you need. Sheet protection is not the same as encrypting a workbook with a password.
How to protect cells in Google Sheets
In Google Sheets in a web browser, select the cells you want to protect, then choose Data > Protect sheets and ranges. A panel opens at the right of the spreadsheet. Confirm the range, add a description if useful, and select Set permissions. You can restrict editing to yourself or specify particular people, depending on your access and sharing setup.
To protect a whole sheet instead, choose Sheet in the protection panel and select the sheet. You can also set exceptions so that a few ranges remain editable—for instance, protect an inventory sheet but leave the “Count entered” column open for staff. Review the selected range and permission choices before saving, especially if the file is shared with a large group.
Google Sheets also offers a warning option for a protected range. A warning tells someone that they are about to edit a range, but it does not prevent the edit. If you need to block edits by specified collaborators, choose a permission restriction rather than relying on the warning. Protection settings may not be available while you are editing an Excel file in Office compatibility mode; convert or save it as a Google Sheets file if you need Sheets-specific protection features.
Excel and Google Sheets compared
Both applications can help preserve formulas and fixed labels while letting people fill in designated areas, but their permission models differ. Excel’s Locked checkbox is a cell property that takes effect under worksheet protection. Google Sheets protection is configured as a protected range or sheet, with permissions for people who have access to the file.
- Choose Excel protection when the workbook’s worksheet settings and allowed actions matter, or when the file is primarily used in Excel.
- Choose Google Sheets protection when collaborators work in a shared online spreadsheet and you need to specify who may edit a range.
- Check file access separately in either program. A person who should not see spreadsheet contents should not be given access to the file merely because some cells are protected.
Neither method makes a protected formula invisible by itself. In Excel, there is a separate Hidden setting for formulas, which takes effect when the sheet is protected; it hides a formula from the formula bar in that context, but it does not encrypt the workbook’s data. In Google Sheets, hiding a sheet is likewise not a reliable confidentiality measure for people who can access the spreadsheet. Use file-level sharing and appropriate data handling for sensitive information.
What cell protection does—and does not—protect
Protection is most valuable as an error-prevention tool. It can help keep a user from overwriting a calculation, changing a template heading, or editing a range that is meant to be maintained by a particular person. It is not the same as read-only file access, and it does not prevent someone from seeing data they are allowed to view.
In Excel, worksheet protection is distinct from workbook protection. Protecting a worksheet controls edits and selected actions on that sheet. Protecting workbook structure is a separate option that can restrict changes such as adding, deleting, moving, or renaming sheets. Neither setting is the same as encrypting a workbook to control who can open it.
In Google Sheets, range protection controls editing within the spreadsheet for collaborators, but it is not a privacy boundary for the contents. If collaborators can view the file, assume they can see the protected values. For sensitive material, limit sharing at the file level and consider keeping confidential data in a separate, access-restricted file.
Common problems and fixes
- Excel still lets me edit a locked cell. Check whether the worksheet is protected. A cell’s Locked setting alone does not block editing.
- Excel blocks every cell. That is often the default: cells start as Locked. Unlock the intended input cells before choosing Review > Protect Sheet.
- Google Sheets shows a warning, but edits still happen. A warning is only a prompt. Change the protected range’s permissions if you need to restrict editing.
- A collaborator can edit a protected area. Check the selected range, the list of permitted editors, and whether the person has file-level ownership or other access that affects the protection. Test with the intended account when practical.
- The protection menu is missing. Confirm that you have sufficient permission to change the file and, in Google Sheets, that you are working in a native Sheets file rather than an Office compatibility view.
Before sharing a template, test it as a typical collaborator would use it. In Excel, try entering data in both an unlocked input cell and a locked formula cell. In Sheets, review the protected-range panel and confirm that the right people are allowed to edit. A quick test can catch a range selection that omitted the last row or included a cell that should have stayed editable.
Frequently Asked Questions
Can I lock just one cell in Excel?
Yes. Select the cell, make sure Locked is selected under Format Cells > Protection, and protect the worksheet using Review > Protect Sheet. The cell’s Locked setting will not block edits until sheet protection is turned on.
Can I lock cells in Google Sheets with a password?
Google Sheets protects ranges by controlling which collaborators may edit them; it does not use an Excel-style password to lock an individual range. Set permissions in Data > Protect sheets and ranges, and manage who can view or edit the file through its sharing settings.
Can I let people edit some cells but not others?
Yes. In Excel, unlock the input cells and protect the worksheet. In Google Sheets, protect the sheet or selected ranges and define exceptions or permissions so the intended input cells remain available.
Does protecting cells stop people from seeing them?
No. Cell or range protection is about editing, not hiding confidential information. Someone who can view the spreadsheet may still see protected content, so restrict access to the file itself when the data is sensitive.
Can I protect a formula from being changed?
Yes. In Excel, leave the formula cell locked and protect the worksheet. In Google Sheets, add the formula cell or range to a protected range and restrict who can edit it. In both cases, protection reduces unwanted changes but should not be treated as encryption.
Can I protect cells in Excel for the web?
Excel for the web has protection features, but its available controls can differ from the Windows desktop app. If a particular worksheet-protection option is missing, open the workbook in the desktop version of Excel and configure it there.
Related
- Power Query Keep Duplicates: How the Command Works
- Power Query to Combine Excel Files: A Practical Guide
- Power Query Errors: Causes, Meanings, and Fixes
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Alphabetize Formula: Sort Names A to ZTo alphabetize a list in Google Sheets, enter =SORT(A2:A20,1,TRUE) in an empty cell, assuming the names are in…
- Date in Google Sheets: Enter, Format, and CalculateTo enter a date in Google Sheets, type it into a cell in a format your spreadsheet recognizes,…
- How to Insert a Check Mark in Excel in 4 Easy WaysTo insert a check mark in Excel, use Insert > Symbol, paste a check mark into a cell,…
- Can You Delete a Whole Page in Word? Here’s How to Do ItYes. In Word for Microsoft 365 on Windows, press Ctrl+G, enter \page in the Go To box, press…
- How to Delete a Single Page in Word SafelyTo delete a single page in Word, click anywhere on it, press Ctrl+G on Windows (Option+Command+G on Mac),…
- Find Duplicates in Google Sheets: Easy MethodsThe easiest way to find duplicates in Google Sheets is to select the cells, choose Format > Conditional…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.