🔒 Module 27: Protecting Cells, Sheets & Workbooks
Excel protection is the difference between a spreadsheet that survives contact with users and one that gets accidentally broken within minutes of being shared. Protection locks formulas so they cannot be overwritten, restricts which cells users can edit, prevents sheets from being renamed or deleted, and stops workbook structure from being changed. This module covers every layer of Excel's protection system — from locking individual cells to password-protecting entire workbooks — including the correct workflow (which most users get wrong), allowing selective editing, and the specific protection settings needed for interactive dashboards with Slicers and PivotTables.
27.1 How Excel Protection Works — The Two-Step System
Excel protection is a two-step system that most users misunderstand. Both steps must be completed for protection to work correctly.
STEP 1: Set the "Locked" property on individual cells
• All cells are Locked by default
• Unlocking a cell means: "this cell can be edited even when the sheet is protected"
• This step alone does NOTHING — locking has no effect until Step 2
STEP 2: Protect the Sheet (Review → Protect Sheet)
• This activates Step 1 settings
• Locked cells = cannot be edited
• Unlocked cells = can be edited freely
The Key Insight
| Cell Property | Sheet NOT Protected | Sheet IS Protected |
| Locked (default for all cells) | Editable — protection not active | Cannot be edited |
| Unlocked (you explicitly unlocked it) | Editable — protection not active | Can be edited |
Default state of a new worksheet: every cell is Locked AND the sheet is NOT protected. This means everything is editable. To protect formulas: unlock only the input cells the user should edit, then protect the sheet.
27.2 Locking and Unlocking Cells (Step 1)
The Correct Workflow
- Select ALL cells (Ctrl+A) → Format Cells → Protection tab → untick Locked → OK. This unlocks every cell on the sheet.
- Select only the cells that should be protected (formula cells, header cells, cells users must not touch)
- Format Cells → Protection tab → tick Locked → OK. Now only those cells are locked.
- Review → Protect Sheet (Step 2) to activate
Why start by unlocking everything? Because every cell is Locked by default. If you skip step 1, every cell on the sheet will be locked after you protect it — including the cells users need to type into. The correct approach is: unlock all → re-lock only what needs protection → protect the sheet.
Three Ways to Access the Locked Setting
| Method | How |
| Format Cells dialog | Ctrl+1 → Protection tab → tick/untick Locked |
| Home tab shortcut | Home → Cells group → Format → Lock Cell (toggles the Locked property of selected cells) |
| Right-click | Right-click selected cells → Format Cells → Protection tab |
The Hidden Property
The Protection tab in Format Cells has a second tick box: Hidden.
- When a cell is set to Hidden AND the sheet is protected: the formula in that cell does not appear in the Formula Bar when the cell is selected — users can see the result but not the formula
- Use this to protect proprietary formulas (commission calculations, pricing models) from being seen or copied
- Hidden only hides the formula display — the calculated result remains visible in the cell
27.3 Protecting a Sheet (Step 2)
Enabling Sheet Protection
- Review tab → Protect group → Protect Sheet
- — or — right-click the sheet tab → Protect Sheet…
- The Protect Sheet dialog opens
Protect Sheet Dialog Options
| Option | What It Controls | Default |
| Password to unprotect sheet | Optional password required to unprotect. Leave blank for protection without a password (prevents accidental edits but not intentional bypasses). | Blank (no password) |
| Select locked cells | Allow users to click on locked (protected) cells. Untick to prevent even clicking them. | Ticked |
| Select unlocked cells | Allow users to click and edit unlocked cells. | Ticked |
| Format cells | Allow formatting changes (font, fill, borders) on locked cells. Unticked by default — users cannot reformat locked cells. | Unticked |
| Format columns / rows | Allow column width or row height changes. | Unticked |
| Insert columns / rows | Allow inserting new columns or rows. | Unticked |
| Delete columns / rows | Allow deleting columns or rows. | Unticked |
| Sort | Allow AutoFilter sorting. | Unticked |
| Use AutoFilter | Allow using existing AutoFilter dropdowns. | Unticked |
| Use PivotTable & PivotChart | Allow interacting with PivotTables and PivotCharts (including Slicers). Must be ticked for dashboards with Slicers. | Unticked |
| Edit objects | Allow selecting, moving, or resizing charts, shapes, and images. | Unticked |
| Edit scenarios | Allow creating or editing What-If Analysis scenarios. | Unticked |
Recommended Settings for Common Scenarios
| Use Case | Tick These |
| Data entry form (users fill in specific cells only) | Select locked cells, Select unlocked cells |
| Report with AutoFilter (users can filter rows) | Select locked cells, Select unlocked cells, Use AutoFilter, Sort |
| Interactive dashboard with Slicers | Select locked cells, Select unlocked cells, Use PivotTable & PivotChart, Use AutoFilter |
| Read-only view (users cannot click or edit anything) | Nothing (untick even "Select locked cells") |
Unprotecting a Sheet
- Review → Unprotect Sheet (if no password was set, this unprotects immediately)
- If a password was set, a dialog prompts for the password → enter it → OK
- — or — right-click the sheet tab → Unprotect Sheet
Password Warning: Excel's sheet protection password is a deterrent, not a security guarantee. It can be bypassed by determined users using free online tools. For genuinely sensitive data, use file-level encryption (File → Info → Protect Workbook → Encrypt with Password) or store data in a proper database rather than relying on sheet protection alone.
27.4 Allow Users to Edit Ranges
Allow Users to Edit Ranges lets you define specific cell ranges that different users (or anyone) can edit while the sheet is protected — optionally with a range-specific password different from the sheet protection password. This is useful in shared workbooks where different departments should edit their own sections.
Setting Up Editable Ranges
- Before protecting the sheet: Review tab → Protect group → Allow Edit Ranges
- Click New… in the Allow Users to Edit Ranges dialog
- Set:
- Title: a name for the range (e.g., "Finance Team Input")
- Refers to cells: the cell range users can edit (e.g., C5:C20)
- Range password: optional — a password specific to this range. Users who know this password can edit the range even when the sheet is protected. Leave blank to allow anyone to edit.
- Click OK → repeat for additional ranges → click Protect Sheet to apply
Use Cases for Editable Ranges
| Scenario | Range Setup |
| Budget template shared across departments | One editable range per department row, each with a department-specific password |
| Payroll input sheet (managers enter hours) | Hours column unlocked and defined as an editable range; salary calculations locked |
| Self-assessment form (each employee fills their own row) | Each row is a separate editable range with a per-employee password |
27.5 Protecting the Workbook Structure
Workbook protection prevents changes to the workbook's structure: adding, deleting, renaming, moving, hiding, or unhiding sheets. It does not lock cell content — that is handled by sheet protection.
Enabling Workbook Protection
- Review tab → Protect group → Protect Workbook
- The Protect Structure and Windows dialog opens:
- Structure: prevents adding, deleting, renaming, moving, or unhiding sheets. This is the important one — tick this.
- Windows: prevents resizing or moving the workbook window (rarely needed; not available in Excel 365)
- Enter an optional password → OK
What Workbook Protection Prevents
- Inserting new sheets
- Deleting sheets
- Renaming sheets
- Moving or copying sheets (within or between workbooks)
- Hiding or unhiding sheets — critical for dashboards where Data and Calculations sheets are hidden
- Changing the tab colour of sheets
What Workbook Protection Does NOT Prevent
- Editing cell content on any sheet (sheet protection handles this)
- Formatting changes
- Adding or editing charts, shapes, or images
Combined Protection: Sheet + Workbook
For a fully secured dashboard or shared workbook:
- Unlock input cells (Step 1 per sheet)
- Protect each sheet individually with appropriate permissions (Review → Protect Sheet)
- Hide the Data and Calculations sheets (right-click tab → Hide)
- Protect the Workbook Structure (Review → Protect Workbook) so hidden sheets cannot be unhidden
Now users can only interact with the Dashboard sheet and its Slicers — they cannot reveal, edit, or delete the underlying data sheets.
27.6 File-Level Password Encryption
File encryption requires a password to open the workbook at all. This is the strongest protection Excel offers — without the password, the file cannot be opened or read.
Setting a File Open Password
- File → Info → Protect Workbook → Encrypt with Password
- Type a strong password → OK → confirm the password → OK
- Save the file. The password protection takes effect when the file is next opened.
- When opened, Excel prompts for the password before the file contents are visible
Save As Password (Alternative Method)
- File → Save As → Browse → click Tools (bottom of Save dialog) → General Options…
- Two fields:
- Password to open: required to open the file
- Password to modify: required to save changes (file opens read-only without this password)
- Enter passwords → OK → Save
Critical: If you forget the file open password, the workbook is permanently inaccessible. Microsoft cannot recover it. Store passwords in a secure password manager. Before encrypting a shared workbook, ensure all authorised users know the password.
Removing File Encryption
- Open the file (enter password)
- File → Info → Protect Workbook → Encrypt with Password
- Clear the password field (leave it blank) → OK → Save
- The file is now unencrypted
27.7 Mark as Final & Other Workbook Protection Options
Mark as Final
File → Info → Protect Workbook → Mark as Final sets the file to read-only and displays a yellow banner at the top indicating the document is finalised. This is a soft protection:
- Clicking "Edit Anyway" in the banner immediately removes Mark as Final
- Useful as a signal that the file is a finished version, not for security
- Prevents accidental edits when distributing a final report
Restrict Access (Information Rights Management)
- File → Info → Protect Workbook → Restrict Access
- Requires Microsoft 365 with Azure Rights Management or an on-premises IRM server
- Allows permissions to be tied to specific user accounts (Microsoft accounts or Active Directory accounts)
- Can prevent printing, copying, forwarding, or setting an expiry date on access
- The most robust enterprise-level document protection for sensitive payroll or financial data
Digital Signature
- File → Info → Protect Workbook → Add a Digital Signature
- Attaches a digital certificate to the workbook proving it has not been altered since signing
- If the file is changed after signing, the signature becomes invalid
- Used for compliance, audit trails, and regulatory submissions
27.8 Practical SA Protection Scenarios
Scenario 1: Payroll Template (HR sends to managers to fill in hours)
Structure:
Col A: Employee name (locked — pre-filled by HR)
Col B: Employee ID (locked)
Col C: Basic Salary (locked — formula from HR system)
Col D: Hours worked (UNLOCKED — manager enters this)
Col E: Overtime hours (UNLOCKED)
Col F: Total pay (locked — formula: =C*D + C/160*1.5*E)
Setup:
1. Ctrl+A → Format Cells → Protection → untick Locked (unlock all)
2. Select D2:D51, E2:E51 only → leave as unlocked (these are the input cells)
3. Select all other cells → re-lock them (Format Cells → Protection → tick Locked)
4. Review → Protect Sheet → tick: Select unlocked cells only
5. Password: optional (e.g., "HR2025!")
Result: Managers can only type in columns D and E.
All salary formulas are invisible and protected.
Scenario 2: Dashboard (Slicers work, nothing else editable)
Review → Protect Sheet → tick:
• Select locked cells (so clicking cells gives no error cursor)
• Use PivotTable & PivotChart (so Slicers respond to clicks)
• Use AutoFilter (if Timeline Slicer is present)
Do NOT tick: Format cells, Insert/Delete rows/columns, Edit objects
Also: Review → Protect Workbook → Structure
So users cannot unhide the Calculations or Data sheets.
Scenario 3: Shared Invoice Template (Formula cells hidden, input cells open)
For pricing formula cells (margin, discount calculation):
Format Cells → Protection → tick BOTH Locked AND Hidden
Result after protection:
• Clicking the formula cell shows nothing in the Formula Bar
• The calculated result is still visible in the cell
• The pricing formula is completely invisible to the client
Input cells (quantity, product code) remain unlocked and editable.
27.9 Quick Self-Check
Q1: You protect a sheet but then discover that every single cell — including the cells users should be able to type into — is locked and cannot be edited. What went wrong and how do you fix it?
✓ The mistake is protecting the sheet without first unlocking the input cells. Every Excel cell is Locked by default. When the sheet is protected, all cells become un-editable because they are all locked. Fix: unprotect the sheet (Review → Unprotect Sheet) → select ALL cells (Ctrl+A) → Format Cells (Ctrl+1) → Protection tab → untick Locked → OK. This unlocks everything. Then select only the cells that should be protected (formula cells, headers) → Format Cells → Protection → tick Locked. Finally, protect the sheet again (Review → Protect Sheet). Now only formula cells are locked; input cells are freely editable.
Q2: You have a protected dashboard with Slicers, but after protecting the sheet the Slicers no longer respond when clicked. What permission did you forget to enable?
✓ The "Use PivotTable & PivotChart" permission was not ticked in the Protect Sheet dialog. Slicer interaction is classified as a PivotTable operation in Excel, so it requires this permission to be enabled. Fix: Review → Unprotect Sheet → Review → Protect Sheet again → in the dialog, tick "Use PivotTable & PivotChart" (and "Use AutoFilter" if a Timeline is present) → OK. The Slicers now respond to clicks while all other cells remain protected.
Q3: What is the difference between protecting a sheet and protecting a workbook? Can you do both at the same time?
✓ Sheet protection locks individual cell content and controls what users can do on a specific sheet (edit cells, sort, filter, use Slicers). It is applied per-sheet and each sheet can have different protection settings and passwords. Workbook protection locks the structure: it prevents adding, deleting, renaming, moving, hiding, or unhiding sheets. It does not affect cell content. Yes, both can be active simultaneously — and for a complete dashboard this is the recommended setup: protect each sheet to lock formulas, AND protect the workbook structure to prevent users from unhiding the Data or Calculations sheets that are hidden behind the Dashboard. They are completely independent layers.
Q4: A colleague needs to be able to edit cells B5:B20 on a protected sheet but no other cells. The rest of the sheet should be fully locked. How do you set this up?
✓ Two approaches: Approach 1 (simple unlock): Ctrl+A → Format Cells → Protection → untick Locked (unlock all) → OK. Then select all cells EXCEPT B5:B20 → Format Cells → tick Locked. Then Review → Protect Sheet. Now only B5:B20 are unlocked and editable. Approach 2 (Allow Edit Ranges for more control): Review → Allow Edit Ranges → New → set Refers to cells = $B$5:$B$20, optionally set a range password specific to this range → OK. Then protect the sheet. This approach allows you to set a different password for just that range and create multiple named editable ranges for different users or departments.
Q5: You want to prevent users from seeing the VLOOKUP formula in cell D5 that contains your confidential pricing logic. How do you hide the formula while keeping the result visible?
✓ Select cell D5 → Format Cells (Ctrl+1) → Protection tab → tick BOTH Locked AND Hidden → OK. Then protect the sheet (Review → Protect Sheet). After protection, clicking cell D5 shows the calculated result in the cell as normal, but the Formula Bar is completely blank — the VLOOKUP formula is invisible. Without the Hidden setting, clicking the cell would still show the formula in the Formula Bar even though the cell cannot be edited. The Hidden setting specifically suppresses the Formula Bar display. Note: this does not encrypt the formula — a user who unprotects the sheet (if they know the password) can see it. For genuinely confidential calculations, consider using a VBA function or keeping the logic in a database.
Q6: What is the difference between file encryption (Encrypt with Password) and sheet/workbook protection? Which should you use for a payroll file containing salaries?
✓ Sheet and workbook protection prevent editing and structural changes but do not prevent the file from being opened — anyone can open the file and see all data. File encryption (File → Info → Protect Workbook → Encrypt with Password) requires a password to open the file at all; without it, the file's contents are completely inaccessible. For a payroll file containing employee salaries, use BOTH: encrypt the file with a password (so only authorised staff can open it) AND protect the sheets (so that once opened, formula cells cannot be accidentally overwritten). Sheet protection alone is insufficient for sensitive payroll data because the file can be freely opened and all salary data read. File encryption is the appropriate security layer for confidential data; sheet protection is for preventing accidental edits.
✓ Module 27 Complete — You Have Learned:
- The two-step protection system — Step 1: set Locked/Unlocked on cells (no effect alone); Step 2: Protect Sheet (activates Step 1); all cells are Locked by default; correct workflow: unlock all → re-lock formula cells → protect sheet
- Locking and unlocking cells — 3 access methods (Ctrl+1 Protection tab, Home → Format → Lock Cell, right-click); the Hidden property (hides formula from Formula Bar while keeping the result visible; used for proprietary pricing or commission formulas)
- Protect Sheet dialog — all 12 permission checkboxes; recommended settings for data entry forms, filtered reports, interactive dashboards (must tick Use PivotTable & PivotChart for Slicers), and read-only views; unprotecting (with or without password); password security warning (Excel passwords are deterrents not guarantees)
- Allow Users to Edit Ranges — Review → Allow Edit Ranges → New; Title, Refers to cells, Range password; multiple named ranges for different departments; range password different from sheet password
- Workbook protection — Review → Protect Workbook → Structure; prevents adding/deleting/renaming/moving/hiding/unhiding sheets; what it does NOT prevent (cell content editing); combined sheet + workbook + hide sheets = fully secured dashboard
- File encryption — File → Info → Protect Workbook → Encrypt with Password (strongest protection; file cannot be opened without password); Save As → Tools → General Options (Password to open + Password to modify); critical: forgotten password = permanently inaccessible; removing encryption (clear the password field)
- Mark as Final — soft read-only with yellow banner; "Edit Anyway" removes it instantly; signal not security; Restrict Access (IRM/Azure RMS for enterprise permissions per user); Digital Signature (tamper detection for compliance and audit)
- SA scenarios — payroll template (managers fill hours, salary formulas locked and hidden); dashboard protection (Slicers active, no cell edits, workbook structure locked); shared invoice template (Hidden property conceals pricing formula from client)
← Back to All Modules