Permission & Access Issues

How to Fix a Protected Excel Cell with a #REF! Error

Emma BrownEmma Brown Nov 11, 2026 869 views

Question details

The user needs to edit and fix a cell displaying a #REF! error, but cannot do so because the worksheet is protected.

How to Fix a Protected Excel Cell with a #REF! Error
Product
Excel
Device & OS
not provided
Scenario
Attempting to correct an invalid cell reference formula (#REF! error) on a locked or restricted worksheet.
Observed behavior
The cell displays a #REF! error and is blocked from being edited or modified due to active worksheet protection.
Before you start

Ensure you have the worksheet password if one was set, as you will need it to temporarily disable the sheet protection before making any formula corrections.

Solution 1Recommended

Unprotect the Worksheet and Update the Formula

To edit any protected cell, you must first remove the worksheet protection. Once unprotected, you can correct the invalid cell reference causing the #REF! error.

A #REF! error occurs when a formula refers to a cell that is no longer valid, often because the referenced row, column, or sheet was deleted. When a worksheet is protected, locked cells cannot be edited. By temporarily unprotecting the sheet, you regain access to the formula bar to fix the broken reference.

1
Navigate to the Review Tab

Open your Excel spreadsheet and click on the 'Review' tab located in the top ribbon menu.

2
Unprotect the Sheet

Click the 'Unprotect Sheet' button. If the worksheet was secured with a password, a dialog box will appear prompting you to enter it. Type the password and click 'OK'.

3
Fix the #REF! Error

Select the cell displaying the #REF! error. Go to the formula bar and replace the invalid '#REF!' segment with the correct cell reference, then press Enter.

4
Reprotect the Worksheet

If you need to keep the data secure, return to the 'Review' tab and click 'Protect Sheet'. Set your permissions and add a password if desired, then click 'OK'.

Unprotect the Worksheet and Update the Formula
Password Requirement: If the sheet is password-protected and you do not know the password, you will not be able to unprotect the sheet or fix the formula error.
Advanced Spreadsheet Management

Easily Manage Protected Sheets and Formulas with WPS Spreadsheet

WPS Office provides a highly compatible and intuitive interface for managing worksheet protections and fixing formula errors like #REF!. You can seamlessly open Excel files, edit formulas, and manage cell permissions without losing any formatting.

  1. 1. Open your spreadsheet: Launch WPS Spreadsheet and open the file containing the #REF! error.
  2. 2. Unprotect the worksheet: Go to the 'Review' tab on the ribbon and click on 'Unprotect Sheet'. Enter the password if required.
  3. 3. Correct the formula: Click on the cell with the #REF! error and update the formula in the formula bar to reference the correct data.
  4. 4. Restore protection: Click 'Protect Sheet' under the Review tab to lock the cells and secure your data again.
Fully compatible with Microsoft Excel formats (.xlsx, .xls) and formulas.Easily protect and unprotect worksheets with a user-friendly interface.Built-in formula auditing tools to quickly trace and fix #REF! errors.Free and lightweight office suite available for Windows, Mac, and Linux.
QA img-9

Frequently Asked Questions

Why does the #REF! error appear in Excel?

The #REF! error occurs when a formula refers to a cell that is not valid. This most commonly happens when cells, rows, or columns that were referenced in a formula have been permanently deleted or overwritten.

Can I fix a #REF! error without unprotecting the sheet?

No, if the cell containing the error is locked and the sheet is currently protected, Excel prevents any modifications. You must unprotect the sheet first to edit the formula.

What if I forgot the password to unprotect the sheet?

Without the password, you cannot unprotect the sheet using built-in features. You may need to restore a previous backup of the file before it was password-protected or contact the original author of the document.

How do I prevent #REF! errors when deleting rows?

Before deleting rows or columns, you can use the 'Trace Dependents' feature found under the Formulas tab. This shows you if any existing formulas rely on the data you are about to remove, allowing you to adjust them beforehand.