Protect Excel Sheets Except for a Few Cells

How-to basics · Updated November 21, 2026

To protect an Excel worksheet while leaving a few cells editable, first select the cells people may change, open Format Cells with Ctrl+1, clear the Locked checkbox on the Protection tab, and select OK. Then go to Review > Protect Sheet and confirm the protection settings. Locked cells become protected only after you turn on sheet protection.

How Excel cell protection works

Excel separates a cell’s Locked setting from the action that enforces it. In a new worksheet, cells are usually marked as locked by default, but that setting does not prevent editing until you protect the sheet. This arrangement lets you protect most of a worksheet while making selected input cells available.

Think of the Locked checkbox as a label, and Protect Sheet as the switch that applies the label. If you protect a sheet without changing any cell settings, users generally cannot edit any locked cells. If you unlock certain cells first, they can edit those cells while the rest of the protected sheet remains unavailable for ordinary changes.

For example, a monthly expense template might have labels, formulas, and totals that should stay fixed, alongside blank cells for dates and amounts. Unlock the date and amount input cells, then protect the sheet. Users can fill in the template without overwriting its formulas or headings.

Unlock only the cells people may edit

  1. Select the worksheet cells that should remain editable. To select separate, nonadjacent ranges in Excel for Windows, hold Ctrl while selecting each range. For a continuous block, drag across it or select the first cell and use Shift with the arrow keys.
  2. Press Ctrl+1 to open the Format Cells dialog. On the Protection tab, clear Locked, then select OK. The cells are now marked as unlocked.
  3. Choose Review > Protect Sheet. In the dialog, make sure Protect worksheet and contents of locked cells is selected.
  4. Choose which actions are allowed, such as selecting unlocked cells, and optionally enter a password. Select OK and confirm the password if Excel asks you to.
  5. Test the result by trying to type in an unlocked cell and a locked cell. Excel should allow the first change and block the second.

On a Mac, use Command+1 to open Format Cells; the Protection tab and Locked checkbox serve the same purpose. The ribbon layout and dialog wording can vary slightly between versions. In Excel for the web, protection controls and options may differ from the desktop dialogs, so set up or review the detailed cell permissions in the Windows or Mac desktop app when you need precise control.

Choose the protection options carefully

The Protect Sheet dialog lets you control more than whether people can type. It also lists actions that remain permitted while the worksheet is protected. The exact choices depend on the Excel version, but commonly include selecting locked or unlocked cells, formatting cells, inserting or deleting rows, sorting, and using filters.

For a simple form, allowing selection of unlocked cells is usually enough. You can clear Select locked cells so users tab or click only into available input areas. If people need to use an existing filter, permit Use AutoFilter; if they need to sort a protected table, permit Sort. Test those actions after protection because restrictions on the cells involved can affect what Excel allows.

  • Select unlocked cells: Usually keep this enabled so users can reach the input fields.
  • Select locked cells: Turn it off when you want to guide users away from protected formulas and labels.
  • Format cells or columns: Allow only if users should be able to change appearance or widths.
  • Insert or delete rows: Enable only when the worksheet design can accommodate structural changes.
  • Sort or use AutoFilter: Enable when those are part of the normal workflow, then verify them with the protected sheet.

These permissions do not unlock cells. They allow particular operations on the protected worksheet, subject to Excel’s rules and the protection settings. A user who needs to change a locked formula still needs the sheet unprotected or the cell unlocked.

Handle multiple ranges and existing worksheets

You can unlock more than one area before protecting the sheet. Select the first input range, hold Ctrl on Windows (or Command on Mac) while selecting additional nonadjacent ranges, and change Locked once for the full selection. Check the selection carefully: if you accidentally include a formula or heading, that cell will also be editable after protection.

For a large input area, select the range using the Name Box to the left of the formula bar. Enter a reference such as B4:D20, press Enter, and then use Ctrl+1 to clear Locked. A named range can also be selected from the Name Box if the workbook already has one. Avoid selecting entire columns casually in a complex workbook, because that can make far more cells editable than intended.

If the sheet is already protected, Excel may prevent you from changing cell formatting properties. Use Review > Unprotect Sheet first, provide the password if one is required, adjust the Locked setting, and protect the sheet again. If you did not set a password and Excel still blocks the change, confirm that you are working on the intended sheet and that the workbook is not restricted by another protection setting.

Protect formulas while keeping input cells clear

Unlocking input cells is useful for forms, but make the editable areas easy to identify. Add a heading such as Enter quantities here, use a consistent fill color, or include a short instruction above the fields. Color is a visual cue, not a protection setting: a blue cell is not necessarily unlocked, so verify the Locked property rather than relying on appearance.

You can also hide formulas while protecting a sheet. In Format Cells > Protection, select Hidden for formula cells, then protect the worksheet. Formula hiding affects whether the formula appears in the formula bar when its cell is selected; it does not erase the formula or make the workbook confidential. Use it to reduce clutter or discourage casual inspection, not as a security measure.

A practical invoice layout might leave customer name, date, item description, and quantity fields unlocked, while keeping the unit-price lookup and total formulas locked. If users need to enter a price manually, that price field must also be unlocked. The design decision is about which values users are permitted to change, not which cells happen to look like inputs.

Common problems and how to fix them

  • Nothing is editable: The intended input cells may still be locked. Unprotect the sheet, select those cells, clear Locked in Format Cells, and protect the sheet again.
  • Everything is editable: Sheet protection may not have been turned on, or the cells were all unlocked. Protect the worksheet and check the cell settings.
  • A formula was accidentally overwritten: Unprotect the sheet if you have permission, restore the formula, and recheck the unlocked ranges. Consider keeping a clean template copy.
  • Users cannot sort or filter: Review the allowed actions in Protect Sheet. Enable the needed operation and test it on the protected worksheet.
  • You cannot unprotect the worksheet: If a password was set, Excel requires it to remove protection. Ask the workbook owner or administrator; do not assume there is a supported password-recovery option.

Also distinguish sheet protection from workbook protection. Protect Sheet controls changes to a particular worksheet. Workbook structure protection restricts actions such as adding, deleting, moving, or renaming sheets. Protecting one does not automatically provide the other.

Protection is not the same as file security

Worksheet protection is intended to prevent accidental or routine edits, such as someone replacing a formula while filling in a form. It is not a reliable way to keep sensitive information secret or to stop a determined person from accessing workbook contents. A protected sheet can still be viewed, and users may be able to copy visible data.

If you need to prevent people from opening a workbook, use file-level encryption with a password to open it rather than relying on Protect Sheet. Store passwords securely and share them only with people who should have access. If the workbook contains confidential information, follow your organization’s approved storage and access-control practices; hiding a sheet or locking its cells does not make its contents private.

When to use other Excel controls

Cell locking is a good fit when a worksheet should remain a usable template and most of its structure should not change. It is less suitable when users need different access rights for different people, or when data entry must be validated and centrally controlled. In those situations, consider a form, a shared data-entry system, or permissions managed through the location where the workbook is stored.

Data Validation can complement protection. For example, you can restrict an unlocked quantity cell to whole numbers within a reasonable range by using Data > Data Validation. Validation helps guide entries, while protection helps preserve the worksheet layout and locked formulas. Neither feature guarantees that every input is correct, so test the worksheet with realistic entries before distributing it.

Keep an editable master copy before sharing a protected template. When the layout changes, update the master, verify which ranges are unlocked, and then apply protection again. This is especially helpful when a workbook has many sheets or when formulas are revised over time.

Frequently Asked Questions

Can I protect an Excel sheet but leave only one cell editable?
Select that cell, clear Locked under Format Cells > Protection, and then select Review > Protect Sheet. All other cells remain protected if they are locked.

Why can I still edit cells after selecting Locked?
The Locked setting does not take effect until you protect the worksheet. Select Review > Protect Sheet after changing the cell setting.

Can users edit unlocked cells without a password?
Yes. A password is optional for sheet protection. Without one, people can generally unprotect the sheet themselves, so password protection may be appropriate when you want to limit routine changes. It is still not strong confidentiality protection.

Can I protect a sheet but allow formatting?
Yes. In the Protect Sheet dialog, allow formatting cells, rows, or columns as needed. These permissions are separate from unlocking input cells, so test the specific formatting actions users require.

Does protecting a worksheet protect the whole workbook?
No. Sheet protection controls editing on that worksheet. Protect workbook structure separately if you need to restrict adding, deleting, moving, or renaming sheets.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.