How to Protect a Worksheet in Excel

Learn how to protect sheet in Excel on Windows, Mac, or the web, add a password, hide formulas, and keep selected input cells editable.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To protect a worksheet in Excel on Windows or Mac, select the sheet, open Review > Protect Sheet, choose your protection settings, and select OK. You can add a password to require it when removing protection. In Excel for the web, open Review > Manage Protection and turn on Protect sheet.

Worksheet protection controls editing of locked cells; it does not encrypt the file or keep its contents confidential. The desktop steps apply to Excel for Microsoft 365 and Excel 2024, with Windows and Mac instructions separated. If you need editable input cells, prepare those cells before enabling protection.

The short version

  • Desktop protection: Select Review > Protect Sheet to protect the selected worksheet.
  • Editable cells: Unlock input cells before enabling protection so you can still enter data in them.
  • Optional password: Add a password when you want removing sheet protection to require it.
  • Web protection: Open Review > Manage Protection to protect the sheet and configure unlocked ranges.

Your goalWhere to startWhat it does
Protect a Windows worksheetReview > Protect SheetRestricts editing of locked cells
Protect a Mac worksheetReview > Protect SheetApplies your permitted sheet actions
Use the Mac menu alternativeTools > Protection > Protect SheetOpens the Mac protection settings
Protect a worksheet onlineReview > Manage ProtectionConfigures protection, editable ranges, and passwords
Restore paused web protectionReview > Resume ProtectionRestores protection for your session
Leave input cells editable on WindowsFormat Cells > ProtectionUnlocks selected cells before protection
Protect only selected cells on WindowsSelect All, then Ctrl + 1Lets you unlock everything before locking chosen cells
Hide formulasProtection > Hidden in the cell formatting dialogHides formulas from the formula bar after protection
Password protect a range on WindowsReview > Allow Edit RangesRequires a separate password to edit that range
Protect workbook structureReview > Protect WorkbookPrevents changes to worksheet organization
Require a password to open a Windows fileFile > Info > Protect Workbook > Encrypt with PasswordRestricts opening the workbook

Protect your worksheet on Windows

Select the worksheet you want to protect, then open Review > Protect Sheet. In the dialog, select Protect worksheet and contents of locked cells. Leave Password to unprotect sheet blank for protection without a password, or enter a password to require it when removing protection.

Select OK to apply your choices. If prompted, retype your password in Confirm Password and select OK again. Save the workbook after enabling protection.

Protect a worksheet on Mac

Open your worksheet in Excel for Microsoft 365 for Mac or Excel 2024 for Mac. Select Review > Protect Sheet, then choose the permitted actions under Allow users of this sheet to. These choices determine what you allow while protection is active.

Optionally enter a password and retype it under Verify. Select OK and save the workbook. Alternatively, open Tools > Protection > Protect Sheet, configure the same protection settings and optional password, then select OK and save.

Protect a worksheet in Excel for the web

With the worksheet open in Excel for the web, select Review > Manage Protection. Turn on Protect sheet to enable worksheet protection.

To keep an area editable, open Unlocked ranges and enter a range name and cell range. For a password on that range, select Range password, enter and re-enter the password, then select Save. A range password controls editing of that area separately from the sheet protection password.

For a sheet password, select Sheet protection password. Enter and re-enter your chosen password, then select Save. Open Options to configure the actions you want to permit.

For temporary editing, select Review > Pause Protection. When you finish, select Review > Resume Protection to restore protection for your session.

Prepare input cells before protecting the sheet

On an unprotected Windows worksheet, select the cells that should remain editable. Open Home > Alignment > Alignment Settings to open Format Cells, then select Protection. Uncheck Locked and select OK.

Next, select Review > Protect Sheet and complete the Windows protection steps above. The cells you unlocked remain available for input, while other cells retain their default locked state. Changing the cell property alone does not enable worksheet protection.

If your worksheet uses calculations, you can leave their input cells unlocked while protecting the formula cells. For help preparing those calculations, see how to multiply values with Excel formulas or use IF statements in Excel.

Protect selected cells and hide formulas

To protect only selected cells on Windows, start with an unprotected worksheet and select Select All. Press Ctrl + 1, open Protection, uncheck Locked, and select OK. This unlocks the cells so you can choose which ones to protect.

Select the cells you want to protect and press Ctrl + 1 again. Open Protection, check Locked, and select OK. Finish by opening Review > Protect Sheet and completing the protection dialog.

To hide formulas from the formula bar on Windows, select the formula cells. Open Home > Format > Format Cells > Protection, check Hidden, and select OK. Then open Review > Protect Sheet, select Protect worksheet and contents of locked cells, and select OK. If you want a password, enter and confirm it using the Windows protection steps above.

On Mac, select the formula cells and open Format > Cells > Protection to set Hidden before protecting the sheet. Complete the Mac protection steps to apply the setting. Hiding formulas affects their visibility in the formula bar; it does not encrypt the file.

Give an editable range its own password

In Excel for Microsoft 365 or Excel 2024 on Windows, start on an unprotected sheet and open Review > Allow Edit Ranges > New. Enter a name under Title and specify the range under Refers to cells. Enter a password under Range password, select OK, and re-enter it when prompted.

In Allow Users to Edit Ranges, select Protect Sheet and finish enabling protection. Use this option when you want password-controlled editing for a particular area instead of leaving it unlocked. Range passwords do not require your computer to belong to a Windows domain.

Fix cells or formulas that remain editable

If cells remain editable on Windows, check both their Locked setting and whether worksheet protection is enabled. On an unprotected sheet, select the cells, press Ctrl + 1, open Protection, check Locked, and select OK. Then complete Review > Protect Sheet; the cell setting takes effect only after you enable protection.

If formulas still appear in the formula bar, check that you applied Hidden to the formula cells before protecting the sheet. Locking a cell controls editing, while hiding its formula controls formula bar visibility. In Excel for the web, if you paused protection for editing, select Review > Resume Protection to restore it for your session.

Protect workbook structure or file access separately

To prevent worksheet deletion, renaming, hiding, or rearrangement in Excel for Microsoft 365 or Excel 2024 on Windows or Mac, select Review > Protect Workbook. Enter an optional password. On Windows, select OK, re-enter the password when required, then select OK again. On Mac, retype the password if you entered one and select OK.

Complete structural changes before enabling that protection. If you need another sheet with the same contents, copy a worksheet in Excel before protecting the workbook structure. Worksheet protection remains the separate setting for controlling edits within a sheet.

To require a password to open the entire file in Excel for Microsoft 365 or Excel 2024 on Windows, select File > Info > Protect Workbook > Encrypt with Password. Enter the password under Password and select OK. Re-enter it under Reenter Password, select OK, and save the workbook.

File encryption restricts opening the workbook, while worksheet protection controls editing of locked cells. Configure both separately if you need both restrictions. A worksheet password by itself does not make the file confidential.

Frequently Asked Questions

Can you protect a worksheet by right-clicking its tab?

Yes, in Excel for Microsoft 365 and Excel 2024 on Windows, right-click the worksheet tab and select Protect Sheet.... Complete the protection dialog, confirm your password if prompted, and save the workbook.

Where else can you find worksheet protection on Windows?

In Excel for Microsoft 365 and Excel 2024 on Windows, select your worksheet and open Home > Cells > Format > Protect Sheet.... Another route is File > Info > Protect Workbook > Protect Current Sheet. Both open the protection dialog, where you can configure protection, confirm an optional password, and then save the workbook.

Can you open worksheet protection using the keyboard?

In Excel for Microsoft 365 and Excel 2024 on Windows, press Alt + R to open Review, then use Tab or the arrow keys (←, →, ↑, ↓) to reach Protect Sheet and press Enter. You can also press Alt and follow the displayed Key Tips. Complete the protection dialog to enable protection.

Does a view-only OneDrive link remove existing editing access?

A view-only link does not remove editing access you already granted elsewhere. On the OneDrive website, select the workbook, select Share, open the link settings gear, uncheck Allow editing, and select Apply before copying the link. Check existing permissions separately. For work or school accounts, your organization's sharing policies also apply.

Does Mark as Final prevent someone from editing an Excel file?

You can use it to discourage editing by making the file read-only, but a recipient can remove that status and edit it. In Excel for Microsoft 365 and Excel 2024 on Windows, select File > Info > Protect Workbook > Mark as Final.

Share