Lock Cells and Protect a Sheet: Let People Fill Only the Input Cells
Ruhi Bagale shares a fee calculator with five counsellors. Within a week someone types a number over the discount formula and every quote after that is wrong. She unlocks the four yellow input cells, protects the sheet, and now the formulas cannot be overwritten.
Every cell is Locked by default, but locking only works after Review > Protect Sheet. So: unlock the cells people should type in (Format Cells > Protection), then protect the sheet. A password is optional and protects against accidents, not against a determined person.
Download the practice file (protect-sheet-lock-cells.xlsx)
Excel file, 6 KB. It has the sample data used below. All numbers in this workbook are fictional teaching data, not real company figures.
Quick answer
- Select the input cells (hold Ctrl to pick several).
- Press Ctrl + 1, open the Protection tab, untick Locked, click OK.
- Click Review > Protect Sheet.
- Keep Select locked cells and Select unlocked cells ticked; add a password if you want.
- Click OK. Typing in a formula cell now shows a message; input cells still work.
Step by step on the fee calculator
| Cell | What | Locked? |
|---|---|---|
| B3 | Course fee | No (input) |
| B4 | Number of students | No (input) |
| B5 | Discount % | No (input) |
| B6 | Student name | No (input) |
| B8 | Gross =B3*B4 | Yes |
| B9 | Discount =ROUND(B8*B5,0) | Yes |
| B10 | Net =B8-B9 | Yes |
- Colour the input cells yellow so people know where to type.
- Select B3:B6, press Ctrl + 1 > Protection, untick Locked.
- Review > Protect Sheet, click OK (no password in the practice file).
- Try typing in B10: Excel refuses. Type in B4: it works.
- To change formulas later: Review > Unprotect Sheet.
More options
- Hide formulas: before protecting, select formula cells, Ctrl + 1 > Protection, tick Hidden. The formula bar stays empty for those cells.
- Allow Edit Ranges (Review tab): let certain ranges be edited with their own password while the rest stays protected.
- In the Protect Sheet box tick Use AutoFilter or Format columns if users need them; they are off by default.
- Review > Protect Workbook locks the structure: no one can add, delete, rename or unhide sheets.
Protection is not security
Sheet and workbook protection stop accidents. They are not encryption, and a password-protected sheet can still be opened and read. To keep a file private, use File > Info > Protect Workbook > Encrypt with Password, and store the password safely: if you lose it, the file cannot be recovered.
Ravindra Bagale's Tip
Use protection without a password for team templates. It stops accidental typing just as well, and you will never be stuck with a locked template because someone left and took the password with them.
Ravindra Bagale's Tip – मराठी
Team templates साठी password शिवाय protection वापरा. चुकून टायपिंग तेवढंच थांबतं, आणि कोणी नोकरी सोडताना password घेऊन गेला म्हणून template कायमचं lock होत नाही.
Ravindra Bagale's Tip – हिंदी
Team templates के लिए बिना password के protection रखिए। गलती से typing उतनी ही रुकती है, और कोई नौकरी छोड़ते समय password साथ ले गया तो template हमेशा के लिए lock नहीं होता।
Practice task
- Open the Fee calculator sheet. It is protected without a password.
- Type a new number of students in B4 and see B10 change.
- Try to type in B10 and read the message.
- Unprotect the sheet (Review > Unprotect Sheet), hide the formulas in B8:B10, and protect it again.
- Protect the workbook structure and try to delete the sheet.
Learn it properly
Course lessons:
- 14.1 Locked Cells and Protect Sheet
- 14.2 Hiding Formulas and Allow Edit Ranges
- 14.3 Protect Workbook Structure vs Encrypt with Password
Related guides: Data Validation in Excel: Allow Only Valid Numbers, Dates and Phone Numbers · Named Ranges in Excel: Name a Cell or List and Use It in Formulas · Education Excel Template (Fees, Attendance, Marks and Fee Receipt)
Frequently asked questions
Why can I still edit a locked cell?
Locking only works after Review > Protect Sheet. Until then, Locked has no effect.
How do I unprotect a sheet?
Review > Unprotect Sheet, and type the password if one was set.
Can users still sort or filter a protected sheet?
Only if you tick Sort and Use AutoFilter in the Protect Sheet box, and the range is not locked for sorting.
What if I forget the sheet password?
Keep an unprotected master copy. There is no official way to recover a forgotten password.