🔒 🛡️
🔒 Excel Protection

How to Protect a Worksheet in Excel

Stop others from breaking your formulas or deleting data. Learn the correct way to lock cells and protect your sheet — without locking yourself out.

📖 Read Step-by-Step Guide ⚠️ Common Mistakes to Avoid
🛡️ Prevent Accidental Edits ⏱️ 2-Minute Setup ✅ Mac & Windows

Forgot your sheet password? Read this first.

Worksheet protection is not a security feature — it stops accidental edits, not deliberate ones. Microsoft cannot recover a forgotten worksheet password.

⚠️ Before you protect: Save the password somewhere safe. There is no official "reset password" for sheet protection.

What are you trying to protect?

Your Goal Use This Feature Guide Available?
Prevent editing cells or deleting formulas Worksheet Protection ✅ This Page
Prevent opening the file File Encryption (Password to Open) ❌ See File Encryption
Prevent adding/deleting/moving sheets Workbook Protection ❌ See Workbook Protection
Prevent copying/pasting data Worksheet Protection + VBA ⚠️ Advanced Section Below
⚠️ Important Security Note: Worksheet protection is NOT a security feature. It only prevents accidental changes. Anyone with basic Excel knowledge can unprotect a sheet in seconds. For sensitive data, use file encryption instead.

Learn the Correct Method

How to Protect a Worksheet (3 Steps)

Follow these steps carefully to protect your worksheet without locking yourself out of editable cells.

1

🔓 Unlock the Cells You Want Editable (KEY STEP!)

Before protecting, decide which cells users should be able to edit. Select those cells first.

Windows: Select cells → Right-click → Format Cells → Protection → Uncheck "Locked"

Shortcut: Ctrl + 1 → Protection tab

Mac: Select cells → Right-click (or Control+click) → Format Cells → Protection → Uncheck "Locked"

Shortcut: Command + 1 → Protection tab
2

🛡️ Protect the Sheet

Now apply protection to the entire worksheet.

Windows: Go to Review tab → Protect Sheet

Mac: Go to Review tab → Protect Sheet

In the Protect Sheet dialog:

  • Enter a password (optional — leave blank to prevent accidental edits only)
  • Check/uncheck allowed actions (Select locked cells, Select unlocked cells, etc.)
  • Click OK
💡 Tip: If you check "Protect worksheet and contents of locked cells," users can still see but not edit locked cells. Uncheck it to allow full viewing without protection.
3

✅ Test Your Protection

Always test before sharing!

Try to edit one of the locked cells — you should see a message like:

"The cell or chart you are trying to change is protected and therefore read-only."

Try to edit an unlocked cell — it should allow editing normally.

✅ Pro Tip: If you set a password, make sure to save it in a password manager! Microsoft cannot recover forgotten Excel passwords.

Common Mistakes & How to Fix Them

Avoid these pitfalls that many Excel users encounter:

❌ Wrong: Protect without unlocking cells first

All cells become locked, including the ones you wanted editable. Users can't type anywhere!

Fix: Unprotect → Select editable cells → Format Cells → Uncheck "Locked" → Re-protect

✅ Correct: Unlock editable cells first, then protect

Only the cells you selected remain editable. Everything else is protected.

❌ Wrong: Forgetting your password

No recovery option exists. If you forget the password, you cannot unprotect the sheet.

Fix: Always use a password manager or save passwords securely.

✅ Correct: Save password in a password manager

Use tools like 1Password, Bitwarden, or your browser's built-in password saver.

❌ Wrong: Thinking protection = security

Anyone can remove worksheet protection in seconds using free online tools.

Fix: For sensitive data, use File → Info → Protect Workbook → Encrypt with Password.

✅ Correct: Use file encryption for sensitive data

File encryption requires a password to even open the file — much more secure than sheet protection.

Advanced Tips & Tricks

👁️ Hide Formulas (Not Just Lock Them)

Select cells with formulas → Format Cells → Protection → Check both "Locked" AND "Hidden". Now users see the result but not the formula in the formula bar.

✓ Allow Specific Actions

In the Protect Sheet dialog, you can allow users to:

  • Sort data (Format → Sort)
  • Use AutoFilter
  • Edit objects (charts, shapes)
  • Edit scenarios

Uncheck all options if you want maximum protection.

🖥️ Allow Users to Edit Specific Ranges

Go to ReviewAllow Users to Edit Ranges to create named ranges that multiple users can edit, each with their own password.

📱 Excel Online Limitations

In Excel Online, you can protect/unprotect sheets, but you cannot customize which actions are allowed. All protection is all-or-nothing.

🔒 VBA: Programmatically Protect/Unprotect

Use this macro to protect all sheets in a workbook:

Sub ProtectAllSheets()
  Dim ws As Worksheet
  For Each ws In Worksheets
    ws.Protect Password:="yourpassword"
  Next ws
End Sub

About This Guide

Worksheet protection stops accidental edits, not determined ones. This page separates what it does and doesn't do, walks the unlock-then-protect sequence, and flags the mistakes that lock people out of their own sheets.

Frequently Asked Questions

How do I protect a worksheet in Excel without a password?
Leave the password field blank in the Protect Sheet dialog. Anyone can unprotect it by clicking the button, but it still prevents accidental edits from casual users.
I protected the sheet but can't edit any cells. What did I do wrong?
You forgot to unlock the editable cells first. Unprotect the sheet, select the cells you want editable, go to Format Cells → Protection → uncheck "Locked", then re-protect.
Can I protect a worksheet on Mac?
Yes! Same steps: Select cells → Command+1 → Protection → Uncheck "Locked", then Review → Protect Sheet.
What's the difference between worksheet and workbook protection?
Worksheet protection locks individual cells. Workbook protection prevents structural changes like adding, deleting, or reordering worksheets.
I forgot my worksheet password. How do I recover it?
Microsoft cannot recover it. Use third-party tools or VBA, but there's no guarantee. Always save passwords securely.
Does worksheet protection work on Excel Online?
Yes, but with limited options. You can protect/unprotect, but cannot customize allowed actions like in desktop Excel.

Mastered Worksheet Protection? Level Up!

🔐

Unprotect Worksheet

Forgot your password? Learn 3 safe methods to unprotect an Excel sheet without losing data.

Learn More →
📊

Excel Formulas Guide

Now that your formulas are safe, learn advanced Excel functions to boost your productivity.

Browse Excel Guides →
🛡️

Encrypt Excel Files

For sensitive data, learn how to password-protect entire Excel files (not just sheets).

Security Guide →

Continue Exploring

Sources & References

This guide was written and fact-checked against Microsoft's official Excel documentation.

Disclaimer: This guide is for informational and educational purposes only. Always back up your files before making changes. Last Updated: August 18, 2026.

We use cookies to analyze traffic. By continuing you agree to our Privacy Policy.