#REF! Error: How to Repair Broken Cell References

A #REF! error means a formula points at a cell, range, sheet, table or name that no longer exists. The fix is to find the source of the broken reference, point the formula at the correct target, and confirm that every dependent cell now calculates. Wrapping the formula in a function that hides the error is almost never the right repair.

This guide follows the standard operating procedure (SOP) approach. It covers what the error means, what causes it, how to locate every instance, how to repair each cause, which fix to choose, the mistakes that make things worse, and a worked example you can follow in Excel or Google Sheets.

What the #REF! error means

SOP 1.1: Read the error as a missing target

Every formula holds a reference. A reference is an address such as B4, a range such as B2:B40, a sheet-qualified address such as 'Q3 Sales'!C2, a structured table reference such as Sales[Units], or a named range such as TaxRate. When the target stops existing, the formula can no longer resolve it, and the cell shows #REF!.

The error does not mean the formula is wrong in logic. The arithmetic may be correct, and the formula may have worked yesterday. It means the address it depends on has changed or gone.

SOP 1.2: Use a common glossary

The following terms appear throughout this manual.

TermMeaning in this manual
PrecedentA cell that a formula reads from
DependentA cell whose formula reads from another cell
Named rangeA label assigned to a cell or range, used in formulas in place of an address
External linkA reference to a cell in a different workbook file
Structured referenceAn Excel table reference that uses column names, such as Sales[Units]
Volatile functionA function that recalculates on every change, such as INDIRECT and OFFSET
Version historyGoogle Sheets’ record of earlier saved states of a file
Small Business CEO Dashboard

Skip the setup

Small Business CEO Dashboard

Sales, costs, cash and targets on one screen. The formulas are already built, so you type the numbers and the dashboard does the rest.

See it on Taskdale →

Locating every instance

SOP 3.1: Locate errors in Excel

  1. Press Ctrl+(the grave accent key, usually under Escape) to show formulas across the sheet. Scan for#REF!` inside the formula text.
  2. Press Ctrl+F, select Options, set Look in to Formulas, type #REF! and choose Find All. The results list gives the address of every formula that contains the error text.
  3. Press F5, select Special, then choose Formulas and tick Errors. Excel selects every formula that returns an error, which is useful when a formula contains #REF! only in its output.
  4. Check Formulas, then Name Manager, for named ranges whose Refers To field reads #REF!.

SOP 3.2: Locate errors in Google Sheets

  1. Apply conditional formatting to the used range with a custom formula such as =ISERROR(A1), adjusted to the top-left cell of your range. Any cell that shows an error turns the chosen colour.
  2. Use Ctrl+F and search for #REF!. This finds the error in displayed values, which is adequate for locating the affected cells, though it will not show you the formula text.
  3. Click each highlighted cell and read the formula bar. The formula will often show the broken argument directly, such as a range that now reads #REF! in place of an address.
  4. Check Extensions and Named ranges for any name that no longer resolves.

SOP 3.3: Trace the dependency chain

Finding the first broken cell is not enough. A single #REF! in a helper column can propagate into totals, charts and summary tables. In Excel, select the broken cell and use Formulas, Trace Dependents, to draw the arrows that show what relies on it. In Google Sheets, follow the chain by clicking through the dependent formulas. Record every affected cell before you start repairing, so you can confirm the full set is fixed afterwards.

Choosing the right fix

SOP 5.1: Compare the available options

Several fixes can clear the visible error. They differ in durability, risk and effort.

FixDurabilityRiskEffortBest used when
Undo or restore versionHigh, if the state is correctLost work since the restore pointLowThe break is recent and the file has a clean history
Manual repointHighHuman error in reconstructionMediumThe data still exists and its new location is clear
Replace with INDEX/MATCHHighRequires reviewing logicMediumA VLOOKUP index or position has become fragile
Wrap in IFERRORLowHides real failuresLowOnly as a temporary measure with a documented reason
Break external linkHigh for values, none for live dataPermanent loss of updatesLowThe source file is retired and the values are final

SOP 5.2: Prefer lookup functions that resist column shifts

Essential spreadsheet formulas and functions behave differently under structural change. VLOOKUP depends on a column index number, so inserting or deleting columns can silently change which column it returns, or cause #REF! if the index falls outside the range. INDEX combined with MATCH locates the return column and the lookup column separately, so it is less affected by column edits.

For example, replace this:

=VLOOKUP(A2,'Q3 Sales'!A2:C40,3,FALSE)

with this:

=INDEX('Q3 Sales'!C2:C40,MATCH(A2,'Q3 Sales'!A2:A40,0))

The second formula returns the same value as long as the lookup and return columns still exist. Its failure mode is an explicit #N/A or a deleted column, both of which are easier to diagnose than a silent shift.

Structured table references, such as Sales[Price], are another durable option in Excel. They follow column renames and insertions automatically. They still return #REF! if the column itself is deleted, so they reduce risk rather than eliminating it.

SOP 5.3: Use IFERROR only as a labelled exception

IFERROR replaces an error with a fallback value, such as =IFERROR(VLOOKUP(...),0). It is useful for presentation layers, where a blank result is preferable to an error code. It is harmful in calculation layers, because a total that quietly treats a broken reference as zero is wrong without any visible sign. If you use it, restrict it to a specific formula, document the reason, and keep a check that counts errors in the source data.

Lapis Ledger Annual Budget

Ready-made template

Lapis Ledger Annual Budget

Monthly and annual budget tabs for Excel and Google Sheets, with category totals that add themselves up.

See it on Taskdale →

Common mistakes

SOP 6.1: Hiding the error instead of fixing the reference

Wrapping a whole block in IFERROR removes the warning and leaves the cause in place. The next break will be invisible. Always repair the reference first, then decide whether a fallback is still needed.

SOP 6.2: Breaking links to make errors disappear

Break Link (Excel) and copy-paste as values both remove formulas. Both are reasonable for a final archive, but used during repair they freeze the workbook’s numbers. Anything that depended on the live link will stop updating, and the damage may not be noticed until a report is wrong.

SOP 6.3: Fixing one cell and not its dependants

A correction to the first cell in a column is only half the work. If the corrected formula is not filled down the rest of the range, the remaining cells still show #REF!, or worse, they keep an older, incorrect reference that does not error at all. Fill the corrected formula through the whole block and check the last row.

SOP 6.4: Deleting rows to tidy up referenced areas

Deleting empty-looking rows is a common cause of breaks, because the empty rows may still be referenced by a total or lookup. Before deleting, use Trace Precedents or search for the row numbers in formulas. Clearing contents is safer than deleting a row when you are unsure.

SOP 6.5: Assuming renaming is always safe

Excel updates direct references when a sheet is renamed, which is correct. It does not update the text inside INDIRECT or the values in a formula built with & concatenation. Renaming a tab that a text-based formula depends on will create #REF! errors that appear to come from nowhere.

SOP 6.6: Ignoring the file’s history

Repairing a break without knowing when it occurred makes it hard to determine whether other changes were affected. Use version history or the change log to identify the first save after the break. This also tells you whether the break was introduced by a person, an import or a template update.

Worked example

This example follows a simple sales workbook. It has two sheets: Q3 Sales, which holds the raw data, and Summary, which totals the figures and looks up unit prices.

The Q3 Sales sheet has four columns: A (Region), B (Units), C (Unit price), D (Revenue, calculated as =B2*C2). The data runs from row 2 to row 40.

The Summary sheet contains:

  • B2: =SUM('Q3 Sales'!C2:C40), an average-price check on the unit price column
  • B3: =VLOOKUP("North",'Q3 Sales'!A2:C40,3,FALSE), which returns the first price for North

Step 1: Identify the break

A colleague deletes column C on Q3 Sales while tidying the layout, believing the price data was no longer used. Immediately, B2 on Summary shows #REF!, because the entire range it referenced has been removed. B3 is not yet broken, because the lookup range A2:C40 has shrunk to A2:B40. On recalculation, the VLOOKUP now has a column index of 3 against a two-column range, so it also returns #REF!.

The sheet now shows two errors from one action. Following SOP 3.3, the team records both cells and checks what depends on them. There are no further dependants in this small workbook, but in a larger file the same check would reveal the full chain.

Step 2: Check the recoverable state

The deletion happened ten minutes earlier, and no other edits were made. The team presses Ctrl+Z once, column C returns, and both formulas resolve. Had the file been saved and reopened, the next step would be to check the version history or the backup copy.

Assume instead that the file had been saved and closed. The team would open the most recent version from before the deletion, copy the price column, and paste it into a new column on Q3 Sales.

Step 3: Repoint the formulas

The team decides to make the lookup durable, not just restore the original. They replace the VLOOKUP in B3 with an INDEX/MATCH pair, and point the sum at the restored price column.

B3 becomes:

=INDEX('Q3 Sales'!C2:C40,MATCH("North",'Q3 Sales'!A2:A40,0))

B2 is repointed to the restored column (say, column E after the paste):

=SUM('Q3 Sales'!E2:E40)

Because the lookup is now based on matching the region name, the price column can move again without breaking the formula, as long as the column itself survives.

Step 4: Verify

The team repeats the search from SOP 3.1. No #REF! text appears in the formulas. They check B2 against the value recorded before the break. They also check B3 against a manual lookup of the first North row. The two values match.

The team then notes the change in the workbook’s change log, with the date, the cause (a column deletion during layout tidying), the fix (restoration and repointing), and a reminder that the price column is referenced by name in the lookup.

Step 5: What the example shows

The example illustrates three points. First, a single structural change can produce several errors with different causes, so the search has to be complete. Second, undo and version history should be checked before rebuilding, because they are faster and less error-prone. Third, changing a fragile VLOOKUP to a position-independent INDEX/MATCH does not just clear the error, it removes the reason it happened.

Decision rules and checklist

Use the following rules when deciding how to respond to a #REF! error.

  • If the deletion is recent and the file is open, undo first.
  • If a clean earlier version exists, restore it and reapply any intended changes.
  • If the data still exists elsewhere, repoint the formula to it and fill the correction down the full range.
  • If the error comes from a lookup argument, replace the lookup with INDEX/MATCH or a structured reference.
  • If the error is inside INDIRECT, replace the text-based reference with a direct one unless the dynamic behaviour is required.
  • Use IFERROR only in presentation cells, and document each use.
  • Break an external link only when the source is retired and the values are final.

Before closing a repair, confirm the following.

  1. Every instance of the error has been located, using Find, Go To Special or conditional formatting.
  2. Each affected formula has been corrected and filled through its full range.
  3. Named ranges and external links resolve to the intended targets.
  4. Totals and key outputs match a known reference value.
  5. No error has been hidden with a fallback in a calculation cell.
  6. The fix is recorded in the change log, with the cause and the date.
3-Statement Financial Model Kit

Get the finished file

3-Statement Financial Model Kit

Profit and loss, balance sheet and cash flow, all linked. Change one assumption and every statement updates.

See it on Taskdale →

Scroll to Top