If you build a complex financial model, a time-tracking sheet, or a shared expense calculator in Excel, you eventually have to share it with other people. The moment you hand over a spreadsheet to a colleague, you run the risk that they will accidentally click the wrong cell, delete a vital formula, and break the entire workbook.
You can use Excel’s “Protect Sheet” feature to lock the document with a password, but that locks the entire sheet, preventing users from entering the data you actually need them to input. The solution is a two-step process: you must first unlock the specific cells where data entry is allowed, and then lock the rest of the sheet to protect your formulas and formatting.
This guide explains how to lock specific cells in Microsoft Excel while leaving others editable for data entry.
Step 1: Understand How Excel Locks Cells
To use this feature correctly, you must understand a slightly counterintuitive rule in Excel:
By default, every single cell in a brand new Excel workbook is already formatted as “Locked.”
However, this “Locked” status does absolutely nothing until you turn on the overarching “Protect Sheet” feature. Therefore, if you only want to protect a few specific cells (like your formula columns) and leave everything else open for typing, you must first highlight the entire sheet and unlock it, then selectively re-lock the cells you want to protect. Conversely, if you only want people to type in three specific cells, you only need to unlock those three cells, because the rest of the sheet is already primed to lock.
Step 2: Unlock the Data Entry Cells
Let’s assume you have a pricing calculator where users need to input quantities into Column B, but you want to protect the formulas in Column C.
- Highlight the specific cells that you want people to be able to edit (in this example, highlight the input cells in Column B). You can hold down the Ctrl key (or Command on Mac) to select multiple, non-adjacent cells.
- Right-click anywhere inside the highlighted area and select Format Cells… from the menu.
- In the Format Cells dialog box, click on the Protection tab located at the far right of the top menu.
- You will see a checkbox labeled Locked. It will be checked by default. Uncheck this box.
- Click OK.
You have now designated Column B as “unlocked.” However, you can still edit the formulas in Column C because the sheet protection has not been activated yet.
Step 3: Activate Sheet Protection
Now that you have designated which cells are allowed to be edited, you must turn the “lock” on for the rest of the sheet.
- Click the Review tab in the main Excel ribbon at the top of the window.
- In the “Protect” group, click the button labeled Protect Sheet.
- A dialog box will appear. Make sure the box labeled Protect worksheet and contents of locked cells is checked.
- In the “Password to unprotect sheet” field, type a memorable password. (This is optional; you can leave it blank if you just want to prevent accidental clicks rather than malicious tampering).
- In the list of permissions below, ensure that Select unlocked cells is checked. (Pro tip: Uncheck “Select locked cells” entirely. This prevents users from even clicking on your formulas, ensuring they can only navigate between the input boxes you unlocked).
- Click OK. (If you entered a password, you will be prompted to type it again to confirm).
Your spreadsheet is now secure. If a user tries to click on your protected formula cells or press the delete key, Excel will display a warning message stating the cell is protected. They will only be able to type data into the specific cells you unlocked in Step 2.