How to correct #REF! error
The #REF! error in Excel means that a cell reference is invalid—usually because you deleted a cell, row, or column that a formula depends on.
✅ Common Causes & Fixes for #REF! Errors
🔹 1. Deleted a Referenced Cell, Row, or Column
Example:
=SUM(A1:B1)
If you delete column A, the formula becomes:
=SUM(#REF!:A1)
Fix:
- Undo the deletion immediately (
Ctrl + Z). - Update the formula manually with correct references.
🔹 2. Copy-Paste Issues with Relative References
If you move or copy a formula that refers to cells that don’t exist in the new location, you’ll get #REF!.
Fix:
- Use absolute references with
$(e.g.,$A$1) to prevent breaking. - Or double-check cell references after copying formulas.
🔹 3. Using INDIRECT() with Invalid References
=INDIRECT("Z1000000")
If the cell doesn’t exist, Excel returns #REF!.
Fix:
- Ensure the cell reference inside
INDIRECT()is valid. - Use validation or logic to construct only real references.
🔹 4. Referencing a Worksheet or Workbook That’s Deleted or Renamed
='Sheet2'!A1
If you delete or rename Sheet2, it becomes:
=#REF!A1
Fix:
- Restore or rename the missing sheet/workbook.
- Update your formula to use the correct sheet name.
✅ How to Handle #REF! Gracefully
Use IFERROR() to avoid showing the error:
=IFERROR(SUM(A1:B1), "Invalid reference")
⚠️ But it’s always better to fix the reference rather than just hide the error.
🛠️ How to Find All #REF! Errors in a Sheet:
- Press
Ctrl + F(Find). - Type
#REF! - Click Find All — Excel will show all broken formulas.