To lock only certain cells in Excel, you first unlock everything, then re‑lock just the cells you care about, and finally protect the sheet so those locked cells can’t be edited.

What locking cells really means

  • Every cell in a new worksheet starts out as locked , but this does nothing until you turn on Protect Sheet.
  • The trick is to unlock all cells, lock only your “special” cells (like formulas or headers), then protect the sheet so only those locked cells become read‑only.

Step‑by‑step: lock only some cells

Follow this sequence (Excel for Windows/Mac; works similarly in recent versions like Microsoft 365).

  1. Unlock all cells first
    • Press Ctrl + A to select the whole sheet.
 * Right‑click → **Format Cells** → go to the **Protection** tab.
 * Clear (uncheck) **Locked** → **OK**. Now nothing is protected yet, even after you protect the sheet.
  1. Lock only the cells you want protected
    • Select the specific cells, ranges, rows, or columns you want to lock (for example, your formula cells or headers).
 * Right‑click → **Format Cells** → **Protection** tab.
 * Check **Locked** → **OK**. These cells are now marked as protected, but they still won’t actually be enforced until the next step.
  1. Turn on sheet protection
    • Go to the Review tab on the ribbon.
 * Click **Protect Sheet**.
 * (Optional) Enter a password you’ll remember. Without it, anyone can unprotect the sheet; with it, they need the password.
 * Ensure **Protect worksheet and contents of locked cells** is checked, and usually **Select unlocked cells** is checked so people can still type in the editable area.
 * Click **OK**.

Now:

  • Locked cells: Can’t be edited (and can even be hidden if you also checked Hidden in the Protection tab).
  • Unlocked cells: Still fully editable for users, ideal for data entry.

Extra tips you might like

  • Lock only formula cells automatically :
    • Use Ctrl + GSpecial → choose Formulas to select all formula cells, then mark them as Locked and protect the sheet.
  • Allow sorting/filtering while keeping headers locked :
    • In the Protect Sheet dialog, enable options like Sort and Use AutoFilter so users can manipulate data while headers or formula cells stay locked.
  • Highlight which cells are locked :
    • Use Conditional Formatting with a formula like =CELL("protect",A1)=1 to color locked cells, making it obvious what’s editable.

TL;DR: Unlock everything, lock only the specific cells you care about, then protect the sheet; after that, only those chosen cells are uneditable, and the rest stay free for input.

Information gathered from public forums or data available on the internet and portrayed here.