Locking a cell in Excel means telling the program to reject edits to it — but that only happens after you protect the worksheet. Excel stores two settings on every cell: a locked flag (on by default for all cells) and a hidden flag (off by default for all cells). Neither does anything until you turn on sheet protection. So the real procedure is three moves: unlock the cells people should edit, lock the ones they shouldn't, then protect the sheet with a password. In Excel for Microsoft 365, Excel 2024, 2021, 2019, and 2016, that path lives on the Review tab. Microsoft's own support documentation states the rule plainly: "Locking cells or hiding formulas has no effect until you protect the worksheet." Everything below follows from that sentence.

Locked and Hidden Are Cell Format Flags, Not Switches

Every cell in a fresh workbook arrives with its locked flag already set to on. That surprises people who select a cell, click around the ribbon, and find nothing labeled "lock." The control sits at the bottom of the Format Cells dialog on the Protection tab, reachable with Ctrl+1 or right-click → Format Cells. Two checkboxes live there: Locked and Hidden. Excel's default state for a new cell is Locked checked, Hidden cleared.

The Hidden checkbox is a separate feature with its own job: it suppresses a formula from the formula bar while the sheet is protected. It does not hide the cell's computed value. If you hide a formula and protect the sheet, a user who clicks the cell sees the result but not the =SUM(...) behind it. That is useful for proprietary calculations and useless for anything else.

Because the locked flag defaults to on, the practical question flips. You rarely need to lock a cell — you usually need to unlock the input cells before protecting. A budget sheet with 40 formula cells and 10 entry cells requires unlocking 10, not locking 40. Skip that step and protection freezes the entire sheet, which is the single most common complaint about this feature.

Excel's default flags per cell type, checkable in Format Cells:

Cell state Locked flag Hidden flag
Any cell in a new workbook On Off
Cell you manually unlocked Off Off
Formula cell with hidden formula On On
Cell on an unprotected sheet No effect No effect

The flags survive copy and paste. Copy an unlocked input cell and paste it elsewhere, and the destination inherits the unlocked flag. That cuts both ways: pasting a formatted block over your carefully unlocked inputs can re-lock them without warning.

Unlock the Input Cells Before You Protect Anything

Start by deciding which cells a user should be able to change. On a timecard, that's the hours column. On an invoice template, it's the line-item quantity and price fields plus the customer block. Select those cells, open Format Cells with Ctrl+1, go to the Protection tab, and clear the Locked checkbox. Click OK. The cells look identical — no color, no border, no indicator — because the flag is invisible by design.

Selecting non-adjacent cells is the fiddly part. Hold Ctrl and click each cell, or select the first range, hold Ctrl, and drag the next. For scattered inputs across a wide sheet, the Go To Special route is faster: press F5, click Special, choose Formulas, and Excel selects every formula cell at once. Then Format Cells → Protection → check Locked. That locks all calculations in one pass and leaves everything else editable after protection.

If the workflow repeats — a monthly template, a shared tracker — spend two minutes on cell styles. On the Home tab, the Cell Styles gallery offers a New Cell Style option; build one called "Input" with the locked flag cleared. Apply it to entry cells and they stay unlocked through reformatting. Excel ships with an Input style already defined, though its locked state can vary between workbooks, so verify it in Format Cells before relying on it.

One failure case worth knowing: merged cells. A merged range carries the protection flags of its top-left anchor cell. Unlock the anchor and the merged block becomes editable; unlock any other cell in the merge and nothing changes. Unmerge, set the flags, and remerge if a merged input refuses to accept typing after protection.

Turn On Sheet Protection With the Right Checkboxes

With the flags set, go to Review → Protect Sheet. Excel shows a dialog with a password field and a scrolling list of 16 permission checkboxes. Two are ticked by default: "Select locked cells" and "Select unlocked cells." Leave both. They let users click and read the locked formulas while typing only into the unlocked inputs.

The other 14 checkboxes are worth a scan before you click OK. "Format cells," "Format columns," "Format rows," "Insert rows," "Delete rows," and "Sort" all default to off, which means a protected sheet also blocks those actions. If your users need to add rows to a table below the locked area, tick "Insert rows." If they need to resize columns for readability, tick "Format columns." Each permission you grant widens what protection allows — the lock on your formula cells stays intact regardless, because those cells' flags are still on.

The password is optional and genuinely optional. Click OK with an empty password field and the sheet is protected against accidental edits, reversible in two clicks by anyone who knows where Review → Unprotect Sheet lives. That is often the right call for a template shared inside a team. Type a password and Excel offers no recovery path — Microsoft's documentation is explicit that a forgotten password cannot be recovered, and the only routes back in are a backup copy or a third-party password-removal tool. Write the password down somewhere outside the file.

Protection applies per worksheet, never per workbook. A workbook with four tabs needs Review → Protect Sheet run four times. Excel offers no multi-sheet protection command in the standard ribbon, so on a twelve-tab model that is twelve dialogs. Workbooks created before Excel 2007 (the .xls format) can also carry workbook-level structure protection under Review → Protect Workbook, which limits adding, deleting, and renaming sheets rather than editing cells.

Follow the Full Sequence End to End

Here is the whole procedure in working order, from a fresh or existing sheet to a protected, tested file. The order matters: unlocking inputs before protecting is the step that separates a usable sheet from a frozen one.

1: Open the workbook and click the tab of the worksheet you want to protect. 2: Select the cells users should be able to edit — hold Ctrl to grab scattered ranges. 3: Press Ctrl+1 (or right-click → Format Cells), open the Protection tab, and clear the Locked checkbox. Click OK. 4: Optionally select formula cells, return to Format Cells → Protection, and tick Hidden to suppress their formulas in the formula bar. 5: Go to Review → Protect Sheet, type a password if you want one, and review the 16 permission checkboxes against what users must do. 6: Click OK. If you set a password, Excel asks you to retype it; a mismatch sends you back to step 5. 7: Test immediately: type into an unlocked input (it should accept), then try to type into a locked formula cell (Excel should refuse with a dialog reading "The cell or chart you're trying to change is on a protected sheet").

When step 7 fails, the cause is almost always a flag left in the wrong state, not a broken file. If an input refuses edits, its Locked flag is still on — unprotect the sheet (Review → Unprotect Sheet), re-check the cell in Format Cells, and re-protect. If a formula cell accepts edits, its flag was cleared at some point, possibly by a paste that carried formatting. If typing into any cell throws the protected-sheet warning, the sheet protection is on but the input cells were never unlocked — the classic sequence error. Fix the flags with protection off, then protect again.

Lock Only Formulas by Selecting Them in One Pass

On a large model, hand-selecting formula cells is slow and error-prone. Excel's Go To Special dialog does it in three clicks. Press F5 (or Ctrl+G), click Special, choose the Formulas radio button, and click OK. Every formula cell on the sheet is selected at once — constants, blanks, and labels are left out. Press Ctrl+1, tick Locked on the Protection tab, click OK, then protect the sheet. The formula cells lock; the rest of the sheet stays editable because those cells' flags were never changed.

This approach inverts the usual workflow and suits models where inputs are scattered and formulas are everywhere. It also composes with Hidden: with the same formula selection live, tick Hidden alongside Locked and every formula disappears from the formula bar the moment protection goes on. Users see results, not logic.

To lock every formula across a multi-sheet workbook without repeating the dialog per tab, group the sheets first. Right-click any sheet tab, choose Select All Sheets, then run the Go To Special selection and Format Cells steps — the formatting applies to the active cell range on each grouped sheet. Ungroup before protecting, because Review → Protect Sheet also applies to all grouped sheets at once and there is no undo for a wrong password entry across twelve tabs.

A limitation to plan around: Go To Special's Formulas option matches by formula type (numbers, text, logicals, errors). On sheets using dynamic array formulas in Excel for Microsoft 365, spilled ranges behave differently — the formula lives in the top-left cell of the spill and the spilled cells carry no formula of their own. Locking the spill's anchor cell is enough to block edits to the formula; the spilled results still refresh. Confirm the exact behavior on your Excel build before shipping a template that depends on it.

Protect a Whole Workbook Without Wrecking Shared Files

Sheet protection guards cell contents. Workbook protection guards structure: adding, deleting, renaming, moving, hiding, and unhiding sheets. The command is Review → Protect Workbook, and it asks for a password with the same no-recovery rule. Use it on deliverable files where the sheet lineup itself is part of the design — a report pack where tabs must stay in order, or a template where users should add data but not tabs.

Shared files add a wrinkle. When a workbook is stored on SharePoint or OneDrive and co-authored in Excel for the web, protection behaves the same in the browser as on the desktop for cell-level locks, but the ribbon layout differs — Protect Sheet sits under the Review tab in the web app too, and the permission checkboxes are the same 16. Test the protected file in the browser before distributing it, because a permission that reads fine on the desktop can present differently to a co-author editing in the web app.

Protection is also not security. Anyone who can open the file can run Review → Unprotect Sheet and, if no password was set, remove protection instantly. Even with a password, protection stops edits, not determined inspection — the file's contents remain visible to anyone who opens it. Treat sheet protection as an accident guard for cooperative users. For genuine confidentiality, use file-level encryption via File → Info → Protect Workbook → Encrypt with Password, which is a different feature with its own password rules.

One more workbook-level note: Excel's "Protect Workbook" in the modern ribbon means structure protection only. Older guides describe a "Protect Workbook" dialog with windows and structure checkboxes — that legacy dialog still appears in .xls files and is not what the current command opens in .xlsx workbooks. If a tutorial's screenshots don't match your Excel, check the file format before following it.

Lock a Single Cell Without Protecting Everything

Sometimes the goal is one stubborn cell and nothing else — a total that must not be overwritten in an otherwise free sheet. The flag-plus-protection machinery still applies; only the scope shrinks. Select the single cell, confirm its Locked flag is on (it is by default), then protect the sheet with every permission checkbox left at default. The one cell becomes read-only while the rest of the sheet stays editable.

Verify the rest of the sheet first. Protection locks every cell whose flag is on, and Excel sets that flag on all cells by default. Before protecting, select the whole sheet with Ctrl+A, open Format Cells → Protection, and clear Locked, then re-lock only your target cell. Two passes: everything unlocked, then the one cell locked. Skip the first pass and protecting the sheet locks all 17 billion cells, not one.

On sheets where everything genuinely should stay editable except a handful of cells, this two-pass method is cleaner than the unlock-the-inputs route because it matches how the flags work. The mental model is simple: protection enforces the flags, and the flags default to on.

Hidden adds a second layer for single cells. Lock a total and tick Hidden, and the formula bar shows blank when a user clicks it after protection — the displayed result stays visible, the calculation disappears. Use it for rate tables, commission percentages, and anything else where the output is fine to show but the logic is not.

Why Your Locked Cell Still Accepts Edits

The locked cell that accepts typing is the most reported failure in this workflow, and it has five usual causes. Work through them in order and the fix is quick.

Sheet protection was never turned on. Flags alone do nothing. Check Review → Protect Sheet shows "Unprotect Sheet" as the available command. The flag was cleared by a paste. Pasting a copied cell over a locked one can carry the source's unlocked formatting. Re-check Format Cells → Protection. A cell style re-applied the flag. Applying a style that includes unlocked formatting to a locked cell overwrites the flag. Cell styles store protection settings along with fonts and fills. You protected the wrong sheet. Protection is per worksheet; the active tab in the status bar may not be the one you protected. The workbook is in a shared-edit mode that strips protection. Excel for the web and older shared workbooks can behave differently; re-test after saving to OneDrive.

A sixth case hides in merged cells: a range where only the anchor was locked will accept edits in its upper-left region under some Excel builds. Unmerge before setting flags on merged ranges, then remerge.

The reverse failure — a cell that should be editable refuses input — traces to the same list in mirror image. The most frequent cause is simply step order: protection went on before the inputs were unlocked. The fix costs two clicks (Unprotect Sheet, fix flags, Protect Sheet again) but must be done with the password in hand, which is why the no-recovery rule matters before you ever set one.

FAQ

Does locking a cell work without a password?

Yes. A password is optional at the Protect Sheet dialog, and protection with an empty password still blocks edits to locked cells. The difference is who can reverse it: anyone who finds Review → Unprotect Sheet can remove passwordless protection in two clicks. For team templates that is usually fine; for deliverables, set a password and store it outside the file.

Why does Excel lock every cell the moment I protect the sheet?

Because every cell's Locked flag is on by default in a new workbook, and protection enforces every flag at once. Microsoft's documentation confirms this default. The fix is to clear Locked on the cells that must accept input before protecting, or clear it sheet-wide with Ctrl+A → Format Cells and re-lock only the targets.

Can I lock a cell only for some users?

Yes — with an Excel feature most guides skip. On the Review tab, "Allow Edit Ranges" lets you define a named range with its own password, so specific users can edit specific cells even while the rest of the sheet is protected. It works in Excel for Microsoft 365 and the desktop versions, and it is the closest thing to per-user cell permissions Excel offers without SharePoint list-level controls.

What happens to a locked cell if I copy and paste into it?

Excel refuses the paste into a locked cell on a protected sheet and shows the protected-sheet warning. The exception is pasting when the destination cell's flag was cleared but you believe it was locked — a stale flag from a prior paste of formatted content. Re-verify the flag in Format Cells → Protection before assuming protection failed.

Can I recover a worksheet password I forgot?

No. Microsoft states plainly that forgotten passwords cannot be recovered, and its support pages offer no reset route. Your options are a backup copy of the file made before protection, or a third-party password-removal tool whose use you accept at your own risk. Prevention is the only reliable strategy: record the password outside the workbook.

Does the Hidden checkbox hide the cell or just the formula?

Just the formula. Hidden suppresses the formula text in the formula bar while the sheet is protected; the computed value remains visible in the cell. To actually hide content, use column or row hiding, or a custom number format that displays nothing — neither is covered by the Protection tab.

Do locked cells behave the same in Excel for the web and Google Sheets?

Mostly in Excel for the web, with a different ribbon path and the same 16 permission checkboxes. Google Sheets is different under the hood: its protection lives at Data → Protect sheets and ranges, flags are set per range rather than per cell format, and Google's warning-on-edit option lets collaborators edit a protected range after a confirmation prompt — a behavior Excel's binary lock does not offer.

What is the time cost of locking a 12-tab model?

Protection is per sheet, so a 12-tab workbook means 12 Protect Sheet dialogs; at roughly 20 seconds each with a password entry and test, that is about 4 minutes of pure dialog work, plus the flag setup on each tab. Budget 15–20 minutes for a careful first pass on a 12-tab model, and reuse the file as a template rather than repeating it monthly.

The locked-cell workflow is general Excel functionality, not financial, legal, or medical advice; anything involving regulated data retention, audit trails, or confidentiality obligations should be checked against your organization's policies and, where required, a qualified compliance professional, and a forgotten protection password should be treated as a data-loss event rather than a security control.