Excel Cell Protection Options: Lock Cells the Right Way

Formulas & functions · Updated November 18, 2026

Excel cell protection has three main parts: mark cells as Locked or Hidden, then use Protect Sheet to enforce those settings and choose what users may do. Because cells are marked Locked by default, the usual workflow is to unlock the cells people may edit, protect the worksheet, and allow only the actions the sheet needs.

What cell protection does—and does not do

In Microsoft Excel for Microsoft 365 on Windows, cell protection controls editing within a worksheet. It can prevent changes to formulas, labels, or other designated cells while leaving input cells available. Protection is a worksheet rule, not a security boundary: it helps prevent accidental edits and guide routine use, but it is not a substitute for encrypting a file containing sensitive information.

The distinction between a cell’s Locked setting and a protected sheet is important. Locked is a property assigned to cells; by itself, it does not stop anyone from editing them. The setting takes effect only after you protect the worksheet. A new worksheet normally has Locked enabled for every cell, which is why protecting it without first unlocking any input cells can make the entire sheet unavailable for editing.

For example, in a monthly expense template, you might leave category names, headings, and calculation formulas locked while unlocking the cells where people enter dates and amounts. Once the sheet is protected, users can fill in the intended inputs without casually overwriting a formula.

Locked, Unlocked, and Hidden settings

Excel’s cell protection settings are available in the Format Cells dialog. Select the cells, open Home > Format > Format Cells, and choose the Protection tab. On Windows, Ctrl+1 opens Format Cells for the current selection. The Locked and Hidden checkboxes are the main options:

  • Locked: Prevents editing of the selected cells after worksheet protection is turned on. Clear this setting for cells intended as user inputs.
  • Hidden: Hides a cell’s formula from the formula bar when the sheet is protected. It does not hide the cell’s displayed result or contents from someone viewing the worksheet.

Hidden is useful when a worksheet should show a calculated result but not display the underlying formula during ordinary use. It does not conceal the formula from someone who can unprotect the sheet or inspect the workbook by other means. If the formula itself contains confidential information, do not treat this option as protection for that information.

Formatting, number formats, fill colors, and data validation are separate from the Locked and Hidden checkboxes. Locking a cell does not automatically make its displayed value invisible, change its formatting, or prevent it from being copied. Protection concerns which actions Excel permits on the worksheet, subject to the options selected when the sheet is protected.

Unlock only the cells people should edit

Before protecting a sheet, identify the intended inputs. Select those cells, open Home > Format > Format Cells > Protection, clear Locked, and select OK. If users need to enter data in several nonadjacent areas, hold Ctrl while selecting the ranges on Windows, then change the setting for the selection. On Mac, use Command while selecting nonadjacent ranges; the Format Cells dialog is commonly opened with Command+1.

A practical setup sequence is:

  1. Finish the worksheet layout and enter the formulas, labels, and instructions.
  2. Select the cells users are meant to change and clear Locked in Format Cells > Protection.
  3. If appropriate, select formula cells and turn on Hidden in the same dialog.
  4. Choose Review > Protect Sheet.
  5. Set an optional password, then review the permitted actions before selecting OK and confirming the password if prompted.
  6. Test the sheet by trying to edit an input cell, a formula cell, and any area where users need to sort or filter.

Testing matters because a sheet can be technically protected but still be inconvenient. For instance, an unlocked input cell is not useful if users cannot select it, and a filter that worked before protection may be unavailable if the related permission was not allowed.

Choose what users can do on a protected sheet

The Protect Sheet dialog is not simply an on/off switch. It includes permissions that let users carry out particular tasks while preventing other changes. The exact selection should match the way the worksheet will be used. Common options include:

  • Select locked cells and Select unlocked cells: Control which cells users can select. Allowing selection of unlocked cells is generally useful for data entry. Preventing selection of locked cells can make a form easier to navigate, but users may need to select protected cells to copy displayed results.
  • Format cells, columns, or rows: Allow formatting changes in those areas. Leave these off if users should not change the worksheet’s appearance or sizing.
  • Insert or delete rows and columns: Allow structural changes that may affect formulas, references, or the layout. Grant these only when the workflow requires them.
  • Sort and Use AutoFilter: Permit sorting or working with existing filters, subject to Excel’s constraints on protected ranges.
  • Use PivotTable & PivotChart: Allow certain interactions with PivotTables or PivotCharts on the protected sheet.
  • Edit objects or Edit scenarios: Allow changes to objects such as some charts or controls, or to scenarios, where those features are present.

Permission names can be easy to misread: allowing an action does not make every related worksheet change possible. For example, filtering a protected range and creating or changing the filter setup are not necessarily the same task. Sorting can also be restricted when the sort would move locked cells in a protected range. Try the exact workflow with a representative user account or a copy of the sheet before distributing a template.

Protect the worksheet and manage the password

In Excel for Windows, use Review > Protect Sheet to open the protection dialog. You can enter a password or leave the password field blank. A password makes it harder for someone to turn off worksheet protection through normal Excel controls, but sheet protection is not strong file encryption. Do not use it to safeguard confidential material against a determined attempt to access or alter the workbook.

After protection is applied, use Review > Unprotect Sheet when you need to change the protection settings or edit a locked cell. Excel may request the password. Keep any password somewhere appropriate and accessible to the people responsible for maintaining the workbook. If it is lost, Microsoft cannot retrieve it for you; do not assume that a protected worksheet has a convenient password-recovery option.

On Mac, the Review tab also provides worksheet protection controls, although their placement and dialog appearance can differ by Excel release. Excel for the web has its own Review and protection interface, and available configuration options may differ from the desktop app. If a specific permission or advanced setup is missing in the web interface, open the workbook in desktop Excel and configure it there.

Allow editing in selected protected ranges

Sometimes most of a sheet should be protected, but different people need to edit designated areas. Excel for Windows provides Allow Users to Edit Ranges, available from the Review tab in desktop Excel. It lets a workbook author define editable ranges on a protected worksheet and, depending on the setup, assign a password to a range or specify which users can edit it in supported Windows environments.

This is more precise than unlocking every input cell when different groups should have access to different parts of a form. For example, a manager might be responsible for a review section while staff can update only the data-entry section. Range permissions need to be planned and tested: a password for a range is still not the same as file encryption, and access-control choices depend on the workbook’s environment. Availability and management differ on Mac and in Excel for the web, so use Windows desktop Excel if you need this particular range-permission feature.

Worksheet protection versus workbook and file protection

Excel offers several protections with similar names but different purposes. Use the one that matches the risk or change you want to control:

  • Cell and worksheet protection controls edits and selected actions on a sheet. It is appropriate for templates, forms, and reducing accidental changes.
  • Workbook structure protection helps prevent users from adding, deleting, moving, hiding, or renaming worksheets. In Windows desktop Excel, use Review > Protect Workbook and choose the structure protection option. It does not, by itself, stop edits to cells.
  • Password encryption for the file is intended to restrict opening the workbook. In Windows desktop Excel, find it under File > Info > Protect Workbook > Encrypt with Password. This is different from a worksheet password; losing the file password can mean losing access to the workbook.

Other controls, such as storing a file in a service with access permissions, can help manage who can open or edit it. They do not change the meaning of Locked or Hidden. A read-only recommendation or a “mark as final” style notice is also not a reliable barrier: it can discourage edits, but it should not be treated as a security control.

Common problems and practical checks

If a protected sheet will not accept input, first check whether the intended cells were unlocked before protection. Select a problem cell and inspect Format Cells > Protection after unprotecting the sheet. Also check whether the sheet is protected and whether the relevant selection option is enabled. Locked is the default for ordinary cells, so forgetting to clear it is a frequent cause.

If formulas still appear in the formula bar, confirm that Hidden was selected for those formula cells before protecting the sheet. The setting does not mask the displayed answer, and it has no effect until sheet protection is active. Conversely, if users can no longer filter or sort, unprotect the sheet, adjust the applicable Protect Sheet permissions, and test the intended operation again.

Before sharing a protected workbook, check these points:

  • Can users select and edit every intended input cell?
  • Are formulas, headings, and reference values protected from accidental edits?
  • Are the needed formatting, filtering, sorting, and other task-specific permissions enabled?
  • Can the workbook owner unprotect the sheet and make maintenance changes?
  • Does the workbook contain information that needs file-level encryption or access controls instead?

Protection can also affect ordinary workflows such as pasting data, inserting rows, or using controls. Test with realistic actions rather than assuming that a setting will behave exactly like an unrestricted worksheet. Keep an unprotected master copy in a controlled location if the protected sheet is a template that will need regular maintenance.

Frequently Asked Questions

Are Excel cells locked by default?
Yes. Cells are normally marked Locked by default, but that setting does not prevent editing until you protect the worksheet. Unlock the cells intended for entry before using Review > Protect Sheet.

How do I lock only certain cells in Excel?
Unlock the cells users may edit, leave the other cells marked Locked, and then protect the worksheet. Since cells start out locked, this usually means changing the input cells rather than individually locking every formula cell.

Does protecting a worksheet encrypt or hide its data?
No. Worksheet protection limits editing through Excel’s normal interface; it does not encrypt the workbook or hide displayed cell values. Use file encryption and suitable access controls when the goal is to restrict who can open or read the file.

Can I protect formulas but let users enter data?
Yes. Leave formula cells locked, clear Locked for the input cells, and protect the sheet. You can also select Hidden for formula cells if you want their formulas omitted from the formula bar while protection is active.

What if I forget a worksheet protection password?
Excel does not provide a guaranteed password-recovery method for a protected worksheet. Keep a secure record of passwords and retain a controlled backup or master copy. Remember that worksheet protection is not equivalent to file encryption.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.