Most Excel errors can be fixed in a few minutes once you know what each error code means. Errors like #DIV/0!, #REF!, #VALUE!, #NAME? and #N/A are Excel telling you exactly what went wrong, so the fix is usually a matter of finding the cell causing the problem and correcting the formula or the data it points to. This guide walks through identifying and repairing the most common Excel errors on both Windows and Mac.

What You'll Need

  • Microsoft Excel (desktop app on Windows or Mac, or Excel for the web at office.com)
  • Access to the workbook showing the error
  • Permission to edit the file, if it is shared or protected

Step-by-Step

  1. Identify the error code. Click the cell showing the error. Excel displays a small warning icon next to it; click that icon for a short explanation and, in many cases, a suggested fix such as "Trace Error" or help on the function.
  2. Fix #DIV/0! (division by zero). This means a formula is dividing by an empty cell or a zero. Either correct the divisor, or wrap the formula to handle it gracefully: =IFERROR(A2/B2, "") returns a blank instead of the error. Check that the divisor cell is not accidentally empty or formatted as text.
  3. Fix #REF! (invalid cell reference). This usually appears after rows or columns referenced by a formula were deleted. Click the cell, look at the formula bar, and replace the #REF! part with the correct cell or range. If the referenced data was deleted, restore it with Ctrl+Z (Cmd+Z on Mac) immediately, or reopen an earlier version via File > Info > Version History.
  4. Fix #VALUE! (wrong type of argument). A formula is receiving text where it expects a number, often because a "number" cell is stored as text. Select the cell and check for a leading apostrophe or a green error triangle. Convert text to numbers by selecting the range, clicking the warning icon, and choosing Convert to Number, or use =VALUE() on the offending cell.
  5. Fix #NAME? (unrecognized name). Excel does not recognize a function or named range in the formula. Common causes: a misspelled function name (VLOKUP instead of VLOOKUP), missing quotation marks around text (""apples"" not apples), or a function from an add-in that is not enabled. Retype the formula carefully or check Formulas > Name Manager to confirm the named range still exists.
  6. Fix #N/A (value not available). Typical with VLOOKUP, XLOOKUP or MATCH when the lookup value is not found. Check for extra spaces with TRIM, mismatches between text and number formats (the number 100 is not the same as text "100"), or differences in case. If a missing result is acceptable, wrap the lookup in IFERROR or use the if_not_found argument in XLOOKUP.
  7. Fix #NUM! and #NULL!. #NUM! means a calculation produced an impossible number, such as SQRT of a negative value, or an iterative function that could not converge. #NULL! usually means two ranges were separated by a space (an intersection operator) when you meant a comma, for example in a SUM range. Correct the argument separator or the input value.
  8. Trace the source if the fix is not obvious. Select the error cell, go to Formulas > Trace Precedents to see arrows pointing to the cells feeding the formula. Use Trace Dependents to see what depends on the error cell. Remove the arrows later with Formulas > Remove Arrows. (Menu labels can differ slightly between Excel versions and platforms.)
  9. Find every error in the sheet at once. Press Ctrl+G (Cmd+G on Mac? use Ctrl+G or Edit > Find via Cmd+F on Mac), click Special, select Formulas, and tick only the Errors box. Excel selects all error cells so you can review them one by one.
  10. Recalculate and save. Press F9 to recalculate, confirm the results are correct, and save the workbook. If formulas were set to manual calculation, check Formulas > Calculation Options and set it back to Automatic if needed.

Common Mistakes

  • Wrapping every formula in IFERROR without fixing the underlying problem, which hides genuine data mistakes.
  • Deleting a column without checking which formulas reference it, creating a cascade of #REF! errors.
  • Assuming a cell contains a number when it is actually text formatted as a number, which breaks SUM and lookup functions.
  • Ignoring green triangle warnings, which often flag the exact problem before it becomes an error.
  • Using commas as argument separators in locales that expect semicolons (or vice versa), which produces #NAME? or formula parse errors.

Tips

  • Hover over a function name in the formula bar and Excel often shows a tooltip with the correct syntax.
  • Use =ISERROR(cell) or conditional formatting to flag error cells in large sheets without changing the data.
  • Build complex formulas in small pieces across helper cells so you can see exactly where a calculation goes wrong.
  • Before large edits, save a copy of the workbook so you can always return to a working version.
  • XLOOKUP is more forgiving than VLOOKUP for missing values because it has a built-in not-found argument.

Troubleshooting

The error returns after you fix it. Another cell or sheet is feeding the wrong value into your formula. Use Trace Precedents to follow the chain back to the true source.

Every formula shows the text, not the result. The cell is probably formatted as Text. Change the format to General (Home > Number Format), then press F2 and Enter on each affected cell to recalculate.

The workbook itself will not open or crashes. Try Excel's built-in repair: in the Open dialog, select the file, click the arrow next to Open, and choose Open and Repair. If that fails, restore a previous version from File > Info > Version History or your cloud backup.

A shared workbook shows errors only for you. The file may use functions from an add-in or a newer Excel version than yours. Update Excel via File > Account (Windows) or Help > Check for Updates (Mac), and confirm any required add-ins are enabled under File > Options > Add-ins.

Nothing works. Copy your data into a fresh workbook, paste values only, and rebuild the formulas. Corrupted workbook structure is rare, but this reliably isolates whether the problem is the data or the file.

Frequently Asked Questions

What is the fastest way to find all errors in a worksheet?

Press Ctrl+G, click Special, choose Formulas, and select only Errors. Excel highlights every error cell so you can jump straight to them.

Should I hide errors with IFERROR or fix the root cause?

Fix the root cause first. IFERROR is appropriate only when an error is a legitimate expected outcome, such as a lookup that may legitimately find no match.

Why does Excel say my formula is stored as text?

The cell format is set to Text, so Excel treats the formula as a string. Change the format to General, then re-enter the formula.

Can a deleted reference be recovered after I saved the file?

Not directly, but you can restore an earlier version through File > Info > Version History if the file is saved to OneDrive or SharePoint, or from a local backup.

Do these error codes mean the same thing in Excel for the web?

Yes, the error codes and their meanings are identical across desktop, web and mobile versions of Excel, though some tools like Trace Precedents are only available in the desktop app.