Services
Study guides
Free tools
#REF! means a formula points to a cell, row, column or sheet that no longer exists. It usually appears after deleting rows or columns, moving a sheet, or pasting a formula into a workbook that does not contain the referenced sheet.
The short answer
#REF! means a formula points to a cell, row, column or sheet that no longer exists. It usually appears after deleting rows or columns, moving a sheet, or pasting a formula into a workbook that does not contain the referenced sheet.
If the error appeared immediately after deleting a row, column or sheet, press Ctrl+Z (Cmd+Z on Mac) before doing anything else. This restores both the data and the references.
Select the formula, look for #REF! in the formula bar and replace it with the correct range. Use Find (Ctrl+F) → Options → Within: Workbook to locate every occurrence.
If a column was moved, rewrite the reference or use INDEX/MATCH or XLOOKUP so the formula does not depend on a fixed column position.
=XLOOKUP(A2,$D$2:$D$500,$B$2:$B$500,"Not found")INDIRECT turns text into a reference, so a renamed or missing sheet produces #REF!. Use a real structured reference or validate the sheet name before using INDIRECT.
=IFERROR(XLOOKUP(A2,$D$2:$D$500,$B$2:$B$500),"Not found")A lookup that returns a controlled value instead of a broken reference when the key is missing.
Paste the formula into the free browser tools to see the exact fix without uploading your file. The Error Fixer explains the code, the Formula Checker finds syntax problems, and the Formula Explainer breaks down nested logic.
#REF! means a formula points to a cell, row, column or sheet that no longer exists. It usually appears after deleting rows or columns, moving a sheet, or pasting a formula into a workbook that does not contain the referenced sheet.
Undo the deletion first: If the error appeared immediately after deleting a row, column or sheet, press Ctrl+Z (Cmd+Z on Mac) before doing anything else. This restores both the data and the references. Find and replace the broken reference: Select the formula, look for #REF! in the formula bar and replace it with the correct range. Use Find (Ctrl+F) → Options → Within: Workbook to locate every occurrence.
Usually because only some rows contain the trigger: Deleting the row, column or sheet that a formula referenced. Cutting and pasting cells over a range used by another formula. A formula copied from another workbook that references a sheet that is not present.
A lookup that returns a controlled value instead of a broken reference when the key is missing. Use this pattern as a guard: =IFERROR(XLOOKUP(A2,$D$2:$D$500,$B$2:$B$500),"Not found")
Still stuck?
A human Excel expert can repair the formula, explain the cause and return a tested workbook — usually within 24 hours. Fixed quote before work starts, from $15/hr.