How to Lock an Excel Page and Protect Its Cells Safely

How-to basics · Updated November 20, 2026

To lock an Excel page, protect the worksheet: in Excel for Microsoft 365 on Windows, open the sheet, choose Review > Protect Sheet, select the actions people may still perform, and confirm. By default, Excel marks cells as locked, but that setting only takes effect after you protect the sheet. If people should be able to enter data in certain cells, unlock those cells before turning on protection. Excel calls a page of cells a worksheet; the steps below protect a worksheet, not a printed page.

Worksheet protection helps prevent accidental changes to formulas, labels, and other content while leaving permitted tasks available. It is not a substitute for encrypting sensitive information: sheet protection is designed to control editing, not to secure a workbook against determined access.

What You’ll Need

  • An Excel workbook you can edit, opened in Excel for Microsoft 365 on Windows. Save a working copy first if the sheet contains important information.
  • A clear idea of which cells should remain editable. If you plan to use a password, store it somewhere safe; Excel may not be able to recover a forgotten protection password.

Step-by-Step

  1. Open the worksheet you want to protect. Select its tab at the bottom of the workbook. If you have several sheets, protection is applied to the active worksheet only, so repeat the process for each sheet you want to protect. A workbook can still be opened and other unprotected sheets can still be edited.
  2. Decide what users should be allowed to change. If the sheet is a read-only reference, you may want to protect all its cells. If it is a form or template, identify the entry cells, such as blank cells for names, dates, or quantities. Check that formulas and headings are not included in the ranges you intend to leave editable.
  3. Select the cells that should remain editable. Drag across a continuous range, or hold Ctrl while selecting separate ranges on Windows. To select a whole column or row, click its heading, but do that only if every cell in it should be editable. You can also use the Name Box to select a range by typing its address, such as B3:B12, then pressing Enter.
  4. Unlock the selected cells. Press Ctrl+1 to open Format Cells, choose the Protection tab, clear the Locked checkbox, and select OK. On the Mac, use Command+1 to open Format Cells; the dialog has a Protection tab as well. This does not yet unlock cells for editing while protection is off. It sets the cells to remain editable when you protect the worksheet.
  5. Protect the worksheet. Select Review > Protect Sheet. In the dialog, leave Protect worksheet and contents of locked cells selected. Optionally enter a password in the password box. You can protect a sheet without a password, but anyone who can access the workbook may then be able to turn protection off easily.
  6. Choose permitted actions. In the same dialog, review the list of actions users may perform, such as selecting locked or unlocked cells, formatting cells, sorting, or using AutoFilter. Select only the actions your users need. For an entry form, allowing selection of unlocked cells while preventing selection of locked cells can make data entry clearer. Some actions may depend on the sheet’s contents or Excel version.
  7. Confirm and verify the password if prompted. Select OK, then enter the password again if Excel asks you to confirm it. Passwords are case-sensitive. A blank password means protection is turned on without a password; it does not mean that no protection exists. Keep a secure record of any password you set.
  8. Test the protected sheet. Try typing in a cell that should be locked and in one that should accept entries. Excel should block editing in locked cells and allow it in unlocked cells. Also try the permitted actions you selected. If the behavior is not right, unprotect the sheet, adjust cell settings or allowed actions, and protect it again.

On Excel for Mac, the same basic workflow is available from the Review tab using Protect Sheet; dialog layout and shortcut details can differ slightly by release. In Excel for the web, look on the Review tab for sheet-protection controls. The web interface may offer a different set of protection options than desktop Excel. If you cannot find a setting, open the workbook in the desktop app and configure it there.

Common Mistakes

Protecting the sheet before unlocking entry cells: Excel treats cells as locked by default. If you protect the sheet first, users may be unable to enter data anywhere. Unprotect it, select the intended input cells, clear Locked in Format Cells, and protect the sheet again.

Assuming the Locked checkbox protects a cell on its own: The checkbox only matters after worksheet protection is enabled. Conversely, if a sheet is protected, a cell can still be editable because it was unlocked beforehand. Check both the cell setting and the sheet’s protection status when the result surprises you.

Using a password without saving it: Protection passwords can be difficult or impossible to recover. Do not rely on a password you may forget, and do not assume Microsoft can retrieve it. Keep a copy in an approved password manager or another secure place.

Expecting sheet protection to hide confidential data: It is intended to reduce accidental edits, not provide strong security. Do not share sensitive information in a workbook merely because a worksheet is protected. Use appropriate file-level encryption and access controls when confidentiality matters.

Protecting only one sheet or blocking useful actions: Each worksheet has its own protection setting. Also, users may need to sort, filter, select cells, or format entries. Test the workbook from the perspective of someone entering data before sharing it.

Tips

  • Use a consistent visual cue for input cells, such as a light fill color, and explain the cue in a note or instruction near the form. Color alone should not be the only indication if users may have difficulty distinguishing it.
  • Keep formulas and labels locked, and unlock only the smallest practical input ranges. This reduces accidental edits without making the sheet unnecessarily difficult to use.
  • Consider allowing users to select unlocked cells but not locked cells. This can help them move through a form without repeatedly landing on protected formulas. Check the selection options in the Protect Sheet dialog.
  • If you use filters, set up the AutoFilter before protecting the sheet and allow the relevant filter action in the protection options. Test filtering after protection; some actions can be restricted depending on how the sheet was prepared.
  • Protecting a worksheet is different from protecting workbook structure. To stop users from adding, deleting, moving, or renaming sheets, use the workbook-structure protection control on the Review tab instead. That does not replace protecting individual sheet contents.
  • For repeatable templates, keep an unprotected master copy in a safe location. Make a separate protected copy for distribution so you can revise the layout or recover from configuration mistakes.

Troubleshooting

I can still edit a cell after protecting the sheet. The cell may have been unlocked before protection, or you may be editing a different worksheet than the one you protected. Select the cell and inspect Format Cells > Protection after unprotecting the sheet. Also check the active sheet tab and repeat protection on any other sheets that need it.

I cannot type in a cell that should be open. The cell may still be marked Locked, the range may not include that cell, or the wrong sheet may have been protected. Choose Review > Unprotect Sheet, enter the password if requested, select the intended cell or range, clear Locked in Format Cells, and protect the sheet again. If the cell is part of a merged range, confirm that you selected and configured the relevant merged cell correctly.

The Unprotect Sheet command asks for a password I do not know. Ask the workbook’s owner or the person who applied protection. If you created the password, check your approved password store or an earlier unprotected copy. There is no normal Excel setting that reveals a forgotten worksheet password, so avoid making changes to the only copy of the file while seeking a legitimate recovery path.

Users cannot sort or filter after protection. Unprotect the sheet, review the allowed actions in the Protect Sheet dialog, and enable the required option if it is available. For filtering, set up the filter before protecting the sheet and test the result in the version your users will use. If the option remains unavailable, the workbook’s layout or Excel version may limit that action.

The protection option is missing or unavailable. Confirm that the workbook is open in an editable state and that you are on the worksheet you intend to protect. A read-only file or certain sharing and compatibility states can limit changes. Try opening a saved copy in the Excel desktop app, then check the Review tab again. Menu names and available controls can vary slightly between Windows, Mac, and web releases.

Frequently Asked Questions

Does locking an Excel page mean protecting a worksheet?
Usually, yes. Excel calls the grid a worksheet. Protect Sheet controls editing on that worksheet; it does not lock a physical printed page or prevent someone from opening the workbook.

Can I lock only certain cells in Excel?
Yes. Unlock the cells people should edit before protecting the sheet. Leave the other cells marked Locked, then turn on sheet protection. Locked and unlocked cells can coexist on the same protected worksheet.

Can I protect a worksheet without a password?
Yes. Use Protect Sheet and leave the password field blank. This can help prevent casual or accidental edits, but it is weaker than password protection and should not be treated as a security measure.

How do I remove worksheet protection?
Choose Review > Unprotect Sheet. Enter the password if Excel asks for it. Once unprotected, you can edit locked cells or change which cells are unlocked.

Will sheet protection stop people from viewing formulas?
No. Protection mainly restricts editing. To hide formulas from the formula bar, you can mark formula cells as Hidden in Format Cells and then protect the sheet, but this is still not a secure way to conceal sensitive information.

Does protecting one worksheet protect the entire workbook?
No. Protect each worksheet whose contents need protection. Workbook-structure protection is a separate control that can restrict adding, deleting, moving, or renaming sheets.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.