Microsoft Office

How To Lock Microsoft Excel Sheet

To lock a Microsoft Excel sheet, open the worksheet, select Review > Protect Sheet, choose the actions users may perform, and optionally set a password to prevent removal of protection. Save the workbook afterwards. If people need to enter data, unlock those input cells first.

Which licences fit your PC setup?

Prices are an AUD snapshot, not a live quote. Confirm variant and total on the listing.

Lock a worksheet in Excel for Windows

Use worksheet protection to prevent changes to formulas, headings and other cells that should stay intact. Start with a saved copy of your workbook so you can check the settings without risking your working file.

  1. Open the workbook and select the worksheet tab you want to protect.
  2. On the Review tab, select Protect Sheet.
  3. Keep Protect worksheet and contents of locked cells selected.
  4. Choose the actions people should be allowed to perform, such as selecting cells or using an existing filter.
  5. Enter a password in Password to unprotect sheet if you want to require one before protection can be removed.
  6. Select OK. If you entered a password, enter it again when prompted and confirm.
  7. Save the workbook.

Without a password, anyone can remove sheet protection through Excel's controls. With one, the password is needed to unprotect the sheet through those controls. Neither setting encrypts the file or makes its contents confidential. Microsoft explains this distinction in its worksheet protection guidance.

Leave input cells editable and lock the rest

For a budget, timesheet or order form, people usually need to enter values while leaving calculations untouched. Excel cells have the Locked property selected by default, but that property only takes effect after you protect the worksheet. Microsoft describes this behaviour in its guide to locking cells in Excel.

  1. If the sheet is already protected, select Review > Unprotect Sheet and enter its password if prompted.
  2. Select the cells people should be able to edit. In Windows, hold Ctrl while selecting separate input areas.
  3. Right-click the selection and choose Format Cells.
  4. Open the Protection tab, clear Locked, and select OK.
  5. Leave formulas, labels and other fixed content locked.
  6. Select Review > Protect Sheet, choose the permitted actions, and set an optional password.
  7. Confirm the settings and save.

For example, in a simple quantity-and-price worksheet, unlock the quantity and unit price cells while leaving the total formula locked. A user can then update the inputs without overwriting the calculation.

If most of the sheet should remain editable, reverse the selection process: select the entire sheet using the button above the row numbers and beside the column letters, clear Locked, then select only the cells to protect and select Locked again. Finish by protecting the sheet. See Microsoft's instructions for locking or unlocking specific areas.

Choose permissions that match the task

The permissions in Protect Sheet describe actions users may perform while protection is active. Selecting a locked cell does not give permission to overwrite its contents. Allow selection of unlocked cells so people can reach the input areas.

Enable formatting, row insertion or other changes only where the worksheet needs them. Check the actual workflow before sharing: a form that accepts inputs but blocks a required task will need its settings adjusted.

Check that the sheet is locked correctly

Do a quick check on your saved copy before distributing the workbook:

  1. Try replacing a locked heading or formula. Excel should block the change.
  2. Enter a temporary value in an unlocked input cell. That edit should be allowed.
  3. Check any filtering, formatting or navigation people need.
  4. Undo the temporary input, save, and reopen the file to confirm the intended settings remain.

If a cell you meant to protect is still editable, unprotect the worksheet and check its Locked setting. If an input is blocked, clear Locked for that cell before protecting the sheet again. Repeat the setup for each worksheet that needs editing restrictions.

Protect sheet tabs or require a password to open the file

Choose the protection feature according to what you need to control. Locking worksheet cells does not prevent changes to the workbook's sheet structure or require a password to read the file.

Keep worksheets from being renamed or deleted

To protect the workbook structure in Excel for Windows, select Review > Protect Workbook, ensure Structure is selected, and optionally enter a password. Confirm it if prompted, then save.

This restricts actions such as adding, deleting, moving, renaming, hiding or unhiding worksheets. It does not lock the cells inside them. Apply sheet protection separately where needed, as explained in Microsoft's workbook protection guidance.

Require a password before the workbook opens

If the aim is to prevent others reading the contents, use file encryption. In Excel for Windows, select File > Info > Protect Workbook > Encrypt with Password. Enter and confirm the password, then save the workbook. Store that password securely: Microsoft cannot retrieve a forgotten password. Its file protection instructions cover this separate feature.

Mark as Final serves a different purpose. It discourages editing by marking a workbook as finished, but recipients can remove that status. Microsoft's Mark as Final guidance makes clear that it is not a security feature.

Remove protection when you need to update the sheet

Select the worksheet, choose Review > Unprotect Sheet, and enter its password if prompted. Make your changes, review which cells should remain editable, then protect the sheet again and save.

If you do not know the password, ask the workbook owner or use an authorised backup. An Office product key cannot unlock a worksheet. For separate installation or licence issues, the Microsoft Office guides include articles on activating Microsoft Office using CMD and finding a Microsoft Office product key using Command Prompt.

Before sharing your workbook, test one locked formula and one editable input cell in the saved file.

Other editions for separate workloads

Other editions for separate workloads; prices in AUD, confirm the total on the listing.

How to check this worked

  1. Open Settings, System, Activation and confirm the edition shown.
  2. Enter the key and run activation; expect a green tick within a minute.
  3. Reboot and re-check activation survives the restart.

FAQ

What else should you know before buying?

What do I need before starting?
Read the requirements and confirm the edition first; the steps assume the machine is compatible.
How do I know the licence is genuine?
Activate on Microsoft's servers and check Settings, System, Activation. A working activation is the test.
Is this a subscription?
Keys sold here are one-time lifetime licences. Microsoft 365 plans are billed by Microsoft instead.
What if the key fails?
Email hi@ms.codes with the order number and a screenshot. Replacement or refund applies within 30 days.

Check who prepared and reviewed this guide

Written by
MS.Codes editorial
Reviewed by
Support team

Last verified: (source review; see test status above).

Recent Post