How to Fix a #REF! Error in Excel

Tap a step to see it in order.

  1. Understand what causes a #REF! error

    This error appears when a cell, row, or column that a formula referenced has been deleted.

  2. Undo right away

    If you just made the deletion, pressing Ctrl + Z immediately resolves the error.

  3. Find where the error occurred

    Press Ctrl + ` to switch to formula view mode, which makes it easy to spot exactly which cell shows #REF!.

  4. Rewrite the formula

    Re-enter the formula with a correct cell range in place of the deleted reference.

When #REF! suddenly appears in several places at once

If deleting a row, column, or cell causes #REF! errors to pop up in multiple places, it's because formulas that referenced the deleted content lost their target all at once. It looks alarming, but it's straightforward to fix one formula at a time.

#REF! vs. other error types -- when IFERROR isn't the real fix

It's tempting to wrap a #REF!-producing formula in IFERROR and move on, but that only hides the symptom rather than fixing the broken reference underneath. IFERROR is genuinely useful for errors like #N/A or #DIV/0! that can occur naturally with valid data, but a #REF! error usually means the formula itself needs to be rebuilt with a correct reference, not just suppressed.

Frequently Asked Questions

Can I still undo after I've already saved the file?

Yes, as long as you haven't closed the file -- undo remains available for several steps even after saving, but it's lost once you close the program.

Is there a way to prevent #REF! errors in the first place?

Yes -- before deleting a row or column with important references, use "Find & Select > Go To Special" to check which cells contain formulas first, so you know what might be affected.