Excel shows "cannot replace data in protected sheet" because the worksheet or workbook is protected, and protection blocks Find & Replace from altering locked cells. The fix is to unprotect the sheet (Review > Unprotect Sheet), make the change, then protect it again. If you do not know the password, you cannot legally force your way in through Excel itself, so your options are to ask the owner for it, restore an older unprotected copy, or copy the data into a new workbook. Menu labels can differ slightly by Excel version, platform and region.

What You'll Need

  • The password for the protected sheet or workbook, if one was set
  • Excel desktop for Windows or Mac (the browser version can edit, but its protection and find-and-replace behaviour is more limited)
  • Backup or version history access, in case the password is lost or the edit goes wrong

Step-by-Step

  1. Confirm what is actually protected. Click the tab of the sheet where the replace failed and look at the Review tab. If the Unprotect Sheet button is active rather than greyed out, the sheet is protected. Check the Unprotect Workbook button too: workbook protection can block structural changes such as adding, deleting or hiding sheets, though it usually does not block replacing cell contents. The two are separate and each needs its own password.
  2. Make a copy first. Use File > Save As to save a duplicate, or File > Info > Version History to confirm there is a saved version you can fall back on. Do this before unprotecting so a mistaken replace can always be undone.
  3. Unprotect the sheet. On the Review tab, click Unprotect Sheet. If a password was set, Excel asks for it. Type it carefully: the field is case-sensitive and masking means you cannot see typos. With no password set, the sheet unlocks immediately.
  4. Repeat for every relevant sheet. Replace All operates across all selected sheets, so if the workbook has several tabs, unprotect each one you intend to touch. A single still-protected sheet in a grouped selection can stop the whole operation and produce the same error.
  5. Check for workbook-level and shared-workbook protection. Still on the Review tab, click Unprotect Workbook if it is active. If the file is shared through the older Share Workbook feature (Data tab), that legacy mode can also restrict edits. Turn it off if it applies, noting that sharing history may be affected.
  6. Run Find & Replace. Press Ctrl+H on Windows or Command+H on Mac, or use Home > Find & Select > Replace. Enter the search text and replacement, then click Replace All. If the message still appears, an object such as a protected chart, a locked shape or a comment may be involved, so use Find Next and replace items one at a time to identify which cell triggers it.
  7. Verify the result before re-protecting. Scroll through the affected areas and check that the correct cells changed and nothing unintended was rewritten. Replace All is not selective once it runs, so it will happily alter text inside other words or numbers if your search term is short.
  8. Protect the sheet again. Return to Review > Protect Sheet, re-enter the same password, and confirm the options you want. Keep "Select locked cells" and "Select unlocked cells" ticked so users can still navigate and copy data.
  9. If the goal is editing only a few cells, use the right design instead. Protect the sheet but unlock the cells users should be allowed to change. Select those cells, press Ctrl+1 (Command+1 on Mac), go to the Protection tab and clear Locked before applying protection. Replace will then work in those cells.

Common Mistakes

Replacing in a grouped selection. If several sheets are selected, Replace All tries every one. A hidden protected sheet in the group causes the error even though the visible sheet is open.

Confusing sheet and workbook protection. People unprotect the workbook, assume it is done, and are baffled when the error returns. Workbook protection guards structure, not cell contents.

Trusting auto-corrected passwords. Excel passwords are case-sensitive. A capitalised first letter or a trailing space copied from a note is a frequent cause of "the password you supplied is not correct".

Forgetting the sheet was protected for a reason. Formula cells and report layouts are often locked deliberately. Replacing across them can overwrite a formula with plain text, so check the affected range afterwards.

Assuming the browser version behaves the same. Excel for the web handles protection differently in places and cannot run some macros, so open the desktop app for a full fix.

Tips

Keep the worksheet password somewhere secure and documented, such as a password manager, because it cannot be recovered from the file.

When you only need to change a handful of cells, unlock those cells and protect everything else. That removes the whole problem for future editing.

Try replacing only a distinctive phrase rather than a single letter, and tick "Match case" in the Find & Replace dialog so you do not alter text that merely contains your search term.

On large or shared workbooks, work on a copy, run Replace All, then compare the result with Version History before overwriting the original.

If Replace has to run on a protected sheet often, consider a short macro recorded while the sheet is unprotected, or move the editable data to its own unprotected sheet and link it with formulas.

Troubleshooting

The error persists after unprotecting. Check for another protected sheet, workbook protection, or legacy shared-workbook mode. Also confirm the workbook is not marked Read-Only, and that the file is not open in another window or by another user, because read-only files cannot save any change.

You do not have the password. Excel's protection is not designed as a security boundary and there is no supported recovery option built in. Ask the file's owner. If that is not possible, restore an earlier version from Version History or from your own backup. Recreating the data in a new workbook is the reliable fallback.

Find & Replace is greyed out. The sheet is protected, the file is read-only, or the active selection is inside an object such as a text box or chart rather than a cell range. Click a cell first, and switch to the desktop app if you are in the browser.

The password is rejected. Re-type it rather than pasting, watch for caps lock, and check any characters that look similar, such as the digit zero and the letter O.

Changes vanish after saving. If the file is checked out or stored in a synced folder with a conflict, the older copy may win. Save under a new name to prove where the file is being written.

Frequently Asked Questions

Why does Excel say it cannot replace data in a protected sheet?

Because Find & Replace alters cell contents, and protection blocks edits to locked cells. Unprotect the sheet, replace, then protect it again.

Can I replace text in protected cells without the password?

No, not through Excel's own features. There is no supported bypass. Contact the file owner or restore an older unprotected copy.

Does unprotecting the workbook also unprotect the sheets?

No. Sheet protection and workbook protection are independent settings with separate passwords, so each has to be removed separately.

Can I protect a sheet but still let people use Find & Replace?

Only in cells you have unlocked. Unlock the specific cells, then protect the sheet; replacing stays possible there and blocked everywhere else.

Will Replace All change cells on other sheets?

If multiple sheets are selected, yes. Otherwise it works on the active sheet. Check the tab selection before you click Replace All.

Does Excel for the web handle this differently?

Protection and replace options are more limited in the browser. Open the file in the desktop app when you need to remove or reapply protection.