Blog
How to Lock Cells in Excel (and Keep Input Cells Open)
To lock cells in Excel, you mark cells as Locked in Format Cells and then turn on Review > Protect Sheet. The second step is the one people miss: every cell is already marked Locked by default, and none of them are protected until the sheet is. Get the order wrong and either nothing is protected or every cell, input cells included, is blocked. In a gradebook your grade-level team shares, one overwritten formula means a wrong average sits on a report card until a parent emails to ask about it.
Below is the exact order that locks only the cells you choose, the Protect Sheet options worth turning on, and the problems that make locked cells behave unexpectedly.
How cell locking works in Excel
Excel protection has two layers. The Locked checkbox on the Protection tab of Format Cells marks which cells should be protected. Protect Sheet on the Review tab enforces it. Until the sheet is protected, the Locked setting has no effect at all.

The same tab has a Hidden checkbox. A hidden cell still shows its result, but once the sheet is protected the formula bar stays empty when someone clicks it. Hidden also does nothing until protection is on.
Microsoft's guide to protecting a worksheet describes the same sequence: unlock the cells people should edit first, then protect the sheet.
Lock specific cells in three steps
Step 1: Unlock every cell
Click the corner button above row 1, or press Ctrl + A, to select the whole sheet. Press Ctrl + 1 to open Format Cells, go to the Protection tab and clear Locked.

Step 2: Lock only the cells that must not change
Select the formulas and reference values, such as category weights, averages and totals, and tick Locked again. Hold Ctrl to add ranges that aren't next to each other.
To grab every formula at once, press Ctrl + G (or F5), click Special, choose Formulas and click OK. Excel selects every formula cell on the sheet, and one Ctrl + 1 locks them all. The same dialog is under Home > Find & Select > Go To Special. Pick Constants instead to select typed-in values such as a grading scale.

Step 3: Protect the sheet
Go to Review > Protect Sheet. Under "Allow all users of this worksheet to," choose what people may do, and optionally enter a password. Once it is on, the ribbon button changes to Unprotect Sheet, which is the quickest way to tell whether a sheet is protected.

If you set a password, store it with the person who owns the template. Microsoft states plainly that if you forget it, Microsoft cannot retrieve it.
Which Protect Sheet options to allow
The dialog lists fifteen options, from Select locked cells and Select unlocked cells to Sort, Use AutoFilter, Insert rows and Edit objects. Only the first two are on by default. Pick by how the file is used:
| Template | Options to allow | Why |
|---|---|---|
| Gradebook or sign-up form (input only) | Select unlocked cells | Locked cells can't even be clicked, so nobody types over them |
| Class roster that grows | Select unlocked cells, Insert rows | A new student can be added at the bottom |
| Grade report shared with a team | Select locked cells, Sort, Use AutoFilter | People can filter for one student without changing values |
| Report people resize | Format columns, Format rows | Readers can widen columns to fit |
With only Select unlocked cells allowed, the Tab key jumps from one input cell to the next. Lay out input cells in the order people fill them and the form works without a mouse.
Sorting has a catch. Even with Sort allowed, Excel can only sort unlocked cells on a protected sheet, as the Microsoft Learn reference for AllowSorting notes. Unlock the list you want sortable, or unprotect, sort and protect again.
Hide formulas and let some people edit some ranges
A self-checking practice sheet for students is the classic case. The formula that marks each answer right or wrong contains the answer, so tick both Locked and Hidden on those cells before protecting. Students see "Correct" or "Try again," not the formula that gives it away.
When one person needs to edit a range that everyone else can only read, use Review > Allow Edit Ranges before you protect the sheet. Click New, give the range a title, set Refers to cells, and add a range password. Microsoft's guide to locking or unlocking specific areas notes that the command is available only while the sheet is unprotected. Anyone with the range password can edit that range; everything else stays locked.
Worked example: locking a shared gradebook
A seventh-grade science team keeps one Gradebook_Template.xlsx for all five sections. Each teacher types a student's Tests, Labs and Homework averages into columns C, D and E. Column F is the weighted average, =C5*Weights!$B$2+D5*Weights!$B$3+E5*Weights!$B$4, using 50%, 30% and 20% from a Weights sheet, and column G looks up the letter grade from a Grade Scale sheet with XLOOKUP. Last quarter a teacher typed 87.6 straight into one student's average cell while checking a number. Two weeks later a lab regrade raised that student's Labs score from 92 to 100, but the typed-in cell never moved, so the report card showed a B+ when the real average was 90.0, an A-.
The team lead fixed the template in about ten minutes:
- Selected the whole Gradebook sheet and cleared Locked.
- Pressed Ctrl + G > Special > Formulas, which selected columns F and G and the class average row at the bottom, then ticked Locked.
- Shaded the input cells (student name, Tests, Labs, Homework) light yellow so everyone knows where to type.
- Protected the sheet with only Select unlocked cells allowed, and a password she keeps in the team's shared notes.
- On the Weights sheet, she used Allow Edit Ranges so the department chair can adjust the weights with a range password, then protected that sheet too.
Now teachers type three scores, press Tab, and the average always comes from the formula: 88, 100 and 80 give 44 + 30 + 16 = 90.0 and an A-, every time. The same pattern works for a field trip sign-up sheet or a personal budget: lock the totals and the formulas, leave only the names and amounts open.
Why locked cells still change, or nothing can be edited
Protection was never turned on. If the Review tab says Protect Sheet rather than Unprotect Sheet, the Locked setting is not in force yet.
Everything is blocked, including inputs. Step 1 was skipped, so every cell kept its default Locked setting. Unprotect, unlock the input cells, protect again.
The table won't grow. An Excel table (Ctrl + T) can't expand on a protected sheet. Size the table with enough blank rows in advance and unlock the input columns in those rows.
AutoFilter is greyed out. Turn the filter on (Data > Filter) before protecting the sheet, and tick Use AutoFilter in the dialog. You can't add filter buttons after protection is on.
Protection vanished after copying. Pasting cells into a new workbook carries the Locked format but not the sheet protection. Copy the whole file, or use Move or Copy on the sheet tab.
👉 How to Unprotect a Sheet in Excel (and When You Can't)
Windows, Mac and Excel for the web
Excel for Microsoft 365 and Excel 2016 through 2024 on Windows use the same menus: Ctrl + 1 for Format Cells, Review for Protect Sheet and Allow Edit Ranges. On a Mac, Format Cells opens with Command + 1 and Protect Sheet is also on the Review tab.
Excel for the web works through a pane. Choose Review > Manage Protection, switch on Protect sheet, and add Unlocked ranges with a name and cell range for the parts others can edit. You can also pause protection for your session and resume it later. Protected sheets show a lock icon on the sheet tab.
In every version, sheet protection prevents accidental edits; Microsoft notes that worksheet-level protection "isn't intended as a security feature." To stop people opening a file at all, use File > Info > Protect Workbook > Encrypt with Password. To stop people adding, deleting or hiding sheets, use Review > Protect Workbook.
FAQ
Q. Why can people still edit cells I locked?
The sheet isn't protected. Locking only marks cells; Review > Protect Sheet is what enforces it.
Q. Can I lock just one column and leave the rest editable?
Yes. Unlock the whole sheet, select that column's header, tick Locked, then protect the sheet. Leave Delete columns unchecked so nobody removes the locked column.
Q. Can I protect several sheets at once?
Not from the ribbon. Protect Sheet is unavailable while sheets are grouped, so each sheet is protected on its own. Building one finished template sheet and copying it saves the most time.
Q. Does locking cells stop people from seeing the data?
No. Locked cells are still visible and can be copied. Use Hidden to hide formulas, and a file password to keep people out entirely.
Lock a gradebook template with inline AI
Gradebooks, sign-up sheets and self-checking quizzes all need the same setup, and doing it by hand means picking ranges and options file by file. Ask inline AI to "lock every formula in this gradebook and leave the score columns open," and it opens the file on your PC, separates formula cells from input cells, and protects the sheet. The next template gets the same treatment with the same sentence.
Gradebooks and spreadsheets, finished by inline AI in the file itself.
Ask in one sentence for roll-ups, trackers and the cleanup you repeat every week. Your files never leave your computer.





