In Excel: every cell is already marked Locked, but locking only takes effect once you turn on Review ▸ Protect Sheet; to lock just some cells, first unlock the rest via Format Cells ▸ Protection (uncheck Locked), then Protect Sheet.
Select all cells, open Format Cells (Ctrl+1) ▸ Protection, and confirm Locked is ticked (it is by default).
Select only the cells people should still edit, reopen Format Cells ▸ Protection, and uncheck Locked.
Go to Review ▸ Protect Sheet, choose what users may still do, and set a password if you want.
Click OK — the locked cells are now read-only while the unlocked ones accept input.
What this does
The mechanism surprises most people: in a new sheet every cell already carries the Locked attribute, yet that attribute does nothing until you protect the sheet. So locking works in two layers. The Locked checkbox under Format Cells ▸ Protection marks which cells should be frozen, and Review ▸ Protect Sheet is the switch that actually enforces it. To make only some cells uneditable, you unlock the ones people should still type in (uncheck Locked for them), then Protect Sheet so the still-locked cells become read-only. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “lock cells from scrolling in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That is what makes a workspace setting that makes a big sheet comfortable to navigate useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
A form has input cells in column B and a calculated formula in column C that must not be touched. Select B2:B20, open Format Cells (Ctrl+1) ▸ Protection, and uncheck Locked — those input cells are now exempt. Leave column C as-is (still Locked). Now Review ▸ Protect Sheet, optionally set a password, and click OK. People can type freely in column B, but any attempt to edit the formula in C2 is refused with "the cell is protected". Lock cells when you are handing a sheet to other people and want them to fill in some fields without breaking your formulas, headers or layout — budget templates, data-entry forms, shared trackers. It guides input to exactly the right places while keeping the working parts of the model safe. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “lock cells from scrolling in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Ticking Locked and expecting it to work without protecting the sheet — the Locked attribute does nothing until Protect Sheet is on.
- Forgetting that all cells start Locked, so protecting the sheet without unlocking inputs freezes the entire sheet.
- Unlocking the cells you meant to protect by mistake — Locked must stay ticked on the formulas you want read-only.
- Confusing this cell-level locking with file encryption; locking controls editing, not whether the file opens.
Frequently asked questions
Why can I still edit a "locked" cell?
Because the sheet is not protected yet. The Locked attribute is dormant until you turn on Review ▸ Protect Sheet, which is what actually enforces it.
How do I lock only the formula cells and leave inputs open?
Unlock the input cells (Format Cells ▸ Protection ▸ uncheck Locked) while leaving the formulas Locked, then Protect Sheet — only the still-locked formulas become read-only.
Do I have to set a password to lock cells?
No. Protect Sheet works without a password; a password simply stops others from unprotecting the sheet and undoing your locks.