To keep a cell value from changing in Excel, you lock the cell by protecting the sheet. Select the cells you want to remain editable, unlock them (Format Cells > Protection), then turn on sheet protection with a password. Locked cells cannot be edited, and formulas that reference them stay stable. If you only need to stop a formula from shifting when copied, use absolute references with dollar signs (like $A$1). Both methods are covered below.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web (menus may differ slightly by version and platform; the steps below note where they do).
  • A workbook with the values you want to protect.
  • Optional: a password if you want to prevent others from unprotecting the sheet.

Step-by-Step

  1. Decide what should stay editable. By default, every cell in a new worksheet is locked, but the lock only takes effect when you protect the sheet. So first identify the cells that users should still be able to change (for example, input cells). You will unlock those before protecting.
  2. Unlock the editable cells. Select the cells you want to remain editable. Right-click and choose Format Cells (or press Ctrl+1 on Windows, Command+1 on Mac). Go to the Protection tab and clear the Locked checkbox. Click OK. If you want to hide formulas, you can also check Hidden here, but that only hides the formula in the formula bar when the sheet is protected.
  3. Turn on sheet protection. Go to the Review tab and click Protect Sheet. In the dialog, you can set a password (optional but recommended if you need to prevent others from unprotecting). Under Allow all users of this worksheet to, leave the default permissions or adjust as needed. For example, you might allow selecting locked cells but not editing them. Click OK. If you set a password, confirm it.
  4. Test it. Try typing in a locked cell. Excel will show a message that the cell is protected. Try editing an unlocked cell; it should work normally.
  5. If you only need to stop a formula from changing when copied, use absolute references. Instead of protecting the sheet, edit the formula and add dollar signs before the column and row you want to fix. For example, =A1*$B$1 will always refer to B1 even when copied down. Press F4 after selecting a reference to cycle through absolute and relative options (on Windows; on Mac, use Command+T or the shortcut shown in the tooltip).
  6. To protect the entire workbook structure (so sheets cannot be moved, deleted, or renamed), go to Review > Protect Workbook. This is separate from sheet protection and does not stop cell editing.

Common Mistakes

  • Forgetting to unlock input cells before protecting. If you protect the sheet without unlocking the cells users need to edit, they will be locked out. Always unlock first.
  • Assuming protection is security. Sheet protection is not encryption; it prevents accidental changes but can be bypassed by someone determined. Do not use it to protect sensitive data. Use workbook encryption (File > Info > Protect Workbook > Encrypt with Password) for that.
  • Using relative references when you need absolute. If a formula changes when copied, you likely need dollar signs. Press F4 to toggle.
  • Protecting without a password and then forgetting it. If you set a password, store it safely. Excel cannot recover it.
  • Confusing sheet protection with workbook protection. Sheet protection stops cell edits; workbook protection stops structural changes. Use the right one.

Tips

  • Before protecting, use Review > Allow Edit Ranges to designate specific ranges that can be edited by users without a password, even on a protected sheet. This is handy for shared workbooks.
  • If you need to protect formulas but allow sorting and filtering, check those options in the Protect Sheet dialog.
  • To quickly lock only formula cells, use Home > Find & Select > Go to Special > Formulas, then lock those cells and protect the sheet.
  • On Excel for the web, sheet protection is available but some options may be limited; the core steps are the same.
  • Use Ctrl+` (grave accent) to toggle showing formulas, which helps verify references before protecting.

Troubleshooting

  • Cannot edit a cell after protecting: The cell is locked. Unprotect the sheet (Review > Unprotect Sheet), unlock the cell, and re-protect.
  • Forgot the password: Excel does not provide a recovery option. You may need to use a backup or recreate the file. Always keep passwords in a safe place.
  • Protect Sheet is greyed out: The workbook may be shared or the sheet may already be protected. Check the Review tab; if it says Unprotect Sheet, it is already protected. If shared, unshare first.
  • Formula still changes when copied: Check for absolute references. Select the reference and press F4 until dollar signs appear where needed.
  • Cannot sort or filter on a protected sheet: When protecting, enable the sort and filter options in the Protect Sheet dialog.

Frequently Asked Questions

Can I protect only certain cells from changing?

Yes. Unlock the cells you want to remain editable, then protect the sheet. All locked cells become uneditable.

Does sheet protection encrypt my data?

No. It only prevents accidental or unauthorized edits. For encryption, use File > Info > Protect Workbook > Encrypt with Password.

How do I stop a formula from changing when I copy it?

Use absolute references with dollar signs (e.g., $A$1). Press F4 after selecting the cell reference to toggle.

Can I protect a sheet without a password?

Yes, just leave the password field blank. Anyone can unprotect it, but it still prevents accidental changes.

Why can't I edit any cells after protecting?

You likely forgot to unlock the cells you need to edit. Unprotect the sheet, unlock those cells, and protect again.

Is sheet protection available in Excel for the web?

Yes, but some advanced options may not be available. The basic protect/unprotect steps work.