Protect Excel Sheets and Workbooks the Right Way

Protect Excel Sheets and Workbooks the Right Way
⏱ 2 min readUpdated 27 September 2026

Sheet protection stops accidental damage — someone overwriting a formula or deleting a column. It is not strong security, but used correctly it makes shared files far more robust.

In this article
  1. Step 1: unlock the input cells
  2. Step 2: protect the sheet
  3. Step 3: protect the workbook structure
  4. Hide formulas
  5. Macros and protected sheets

Step 1: unlock the input cells

Every cell is “Locked” by default, but locking only takes effect when the sheet is protected. So first select the cells people should edit → Ctrl+1 → Protection → untick Locked. Give them a light yellow fill so users know where to type.

Step 2: protect the sheet

Review → Protect Sheet. Choose what users may still do — select cells, sort, use AutoFilter, format columns — and optionally set a password.

Step 3: protect the workbook structure

Review → Protect Workbook prevents adding, deleting, renaming or unhiding sheets. Useful when hidden calculation sheets must stay hidden.

Hide formulas

Select formula cells → Format Cells → Protection → tick Hidden, then protect the sheet. The results show, the formula bar stays empty.

⚠️ Sheet and workbook protection passwords are weak — they can be removed with freely available tools. For real confidentiality use File → Info → Protect Workbook → Encrypt with Password, which encrypts the whole file, and store that password safely: it cannot be recovered.

Macros and protected sheets

ws.Protect Password:="ops", UserInterfaceOnly:=True   ' macros may still edit

Run it in Workbook_Open, because UserInterfaceOnly is not saved with the file.