LearnExcel.io
Menu

Every Excel Error Code Explained: #REF!, #VALUE!, #SPILL! and More

Written by ·

Excel has only a handful of ways to tell you something went wrong, and each one points to a different culprit. Once you can read them, an error stops being a roadblock and becomes a diagnosis: #REF! means a reference was destroyed, #VALUE! means a data type is wrong, #SPILL! means a dynamic array has nowhere to land. This page covers every error code in one place — what it means, the single most common cause, and the fastest fix — with links to deeper guides where a fix needs more than two sentences.

Quick Reference Table

ErrorMeansMost Common CauseFastest Fix
#####Column too narrow (or negative date)Number/date wider than the cellDouble-click the column border
#DIV/0!Division by zeroDivisor cell is empty or 0Wrap in IFERROR or test the divisor
#N/AValue not availableLookup value not foundCheck the lookup value and range
#NAME?Excel doesn’t recognize a nameMisspelled function or range nameFix the spelling; check quotes
#NULL!Ranges don’t intersectSpace used instead of comma/colonReplace the space with , or :
#NUM!Invalid numeric resultNumber too large, or impossible mathCheck inputs (e.g., SQRT of a negative)
#REF!Reference destroyedDeleted row, column, or sheetUndo (Ctrl+Z), then delete differently
#VALUE!Wrong data typeText in a math operationFind and convert the text cell
#SPILL!Spill range blockedData in the cells below/rightClear the blocking cells
#CALC!Calculation engine errorArray function returned an empty setAdd an if_empty argument
#GETTING_DATAStill retrievingExternal data source is slowWait; it resolves itself

Now the detail — including the causes the table can’t capture.

##### (Hashes Across the Cell)

Not a true error — it’s a display problem. The cell holds a number, date, or time wider than the column. Double-click the right border of the column header to auto-fit, or see the full options for widening columns.

The one exception worth knowing: hashes also appear when a cell formatted as a date or time contains a negative value. Auto-fit won’t help there — you’ll usually find a date subtraction that ran backwards, like =A1-B1 where B1 is the later date.

#DIV/0!

Excel was asked to divide by zero or by an empty cell. You’ll see it constantly in rate calculations — revenue per unit, percent change — where this month’s denominator hasn’t been filled in yet.

Two fixes, in order of preference:

  1. Test the divisor: =IF(B2=0, "", A2/B2) — explicit and only suppresses the case you expect.
  2. Catch everything: =IFERROR(A2/B2, "") — shorter, but it also hides errors you didn’t anticipate, so use it deliberately. Full syntax in our IFERROR guide.

AVERAGEIF and similar functions also throw #DIV/0! when no cells match the criteria — same disease (zero denominator), same cure.

#N/A

“Not available” — the lookup functions’ way of saying I searched and found nothing. VLOOKUP, XLOOKUP, and MATCH are responsible for nearly all of these. We break down the diagnosis in depth in what #N/A means in Excel, but the three causes to check first:

  1. The value genuinely isn’t in the lookup range. Verify by eye or with Ctrl+F.
  2. Invisible mismatch — trailing spaces or a number stored as text. =A2=D2 returning FALSE for two “identical” cells confirms it; clean with TRIM or convert the text to real numbers.
  3. Approximate match running wild — VLOOKUP without FALSE as its fourth argument. XLOOKUP defaults to exact match, which is one of several reasons to switch.

Note that #N/A is the only error IFERROR’s sibling IFNA targets specifically — =IFNA(XLOOKUP(...), "Not found") handles missing lookups without masking genuine formula bugs.

#NAME?

Excel read something in your formula as a name and couldn’t find it. Causes, in rough order of frequency:

  • Misspelled function: =VLOKUP(...). Excel won’t guess.
  • Missing quotes around text: =IF(A1=Yes,1,0) — Excel hunts for a range named Yes. Should be "Yes".
  • A named range that doesn’t exist — deleted, or typo’d. Check Formulas > Name Manager, or see how named ranges work.
  • A function your Excel version doesn’t have — XLOOKUP in Excel 2016, TEXTSPLIT in anything before Excel 365.

Fastest prevention: type the first few letters of a function and accept Excel’s autocomplete with Tab. You can’t misspell what you didn’t type.

#NULL!

The rarest of the bunch. The space character is Excel’s intersection operator=SUM(A1:A10 C1:C10) asks for cells where those two ranges overlap, and since they don’t, you get #NULL!. Almost every real-world occurrence is a typo: you meant =SUM(A1:A10, C1:C10) (comma, two ranges) or =SUM(A1:C10) (colon, one block). Replace the stray space and it’s solved.

#NUM!

The formula produced a number Excel can’t represent or compute. Three distinct flavors — our #NUM! deep dive covers each:

  • Impossible math: =SQRT(-4), or LOG of a negative number.
  • Result out of range: anything beyond ±1×10^308, e.g. =10^400.
  • Iterative function failed to converge: IRR and RATE give up after 20 tries. Supply a guess argument — =IRR(A1:A12, 0.1) — to point them in the right direction.

#REF!

The most destructive error, because the formula is permanently damaged: a cell it pointed to was deleted, and Excel replaced the reference with the literal text #REF!. You’ll see it after deleting rows, columns, or whole sheets that formulas depended on.

If you just caused it, Ctrl+Z immediately — that’s the only fix that restores the original reference. After a save-and-close, you’re rebuilding the formula by hand. Two habits prevent most cases: clear cell contents (Delete key) instead of deleting whole rows/columns, and use ranges in formulas (SUM(A1:A10)) rather than individual cell lists, since ranges survive interior deletions. The full recovery playbook is in how to fix #REF! errors.

A VLOOKUP with a column index larger than its table — =VLOOKUP(x, A:C, 4, FALSE) — also returns #REF!, no deletion required.

#VALUE!

Excel’s “wrong type of argument” complaint: usually text where a number was expected. =A1+B1 throws it the moment either cell contains text — including text that looks numeric, and including a single invisible space. Our #VALUE! troubleshooting guide walks the full checklist; the short version:

  1. Find the offender: select each input cell and check the formula bar for stray characters, or use =ISNUMBER(A1).
  2. Numbers stored as text: look for the green triangle, then convert — multiply by 1, use VALUE(), or Data > Text to Columns.
  3. Dates that are really text: convert them with DATEVALUE or Text to Columns.
  4. Prefer SUM over +: =SUM(A1:B1) skips text instead of erroring, which is why a worksheet can be full of dirty data and still SUM cleanly — until someone writes A1+B1.

#SPILL!

Exclusive to Excel 365/2021 dynamic arrays. A formula like =SORT(A2:A100) or =UNIQUE(B2:B50) returns multiple values that “spill” into neighboring cells — and #SPILL! means something is squatting on that landing zone. Click the error, and Excel draws a dashed border around the intended spill range; whatever’s inside it (data, another formula, even an invisible space) has to move. Merged cells and Excel tables also block spilling — dynamic arrays won’t spill inside a table at all.

The complete diagnosis, including the “spill range too big” variant caused by full-column references like A:A, is in how to fix the #SPILL! error.

#CALC!

Also dynamic-array territory: the calculation engine hit a scenario it can’t resolve. The overwhelmingly common case is FILTER returning an empty set=FILTER(A2:B100, C2:C100="West") when nothing matches “West”. The fix is FILTER’s built-in third argument: =FILTER(A2:B100, C2:C100="West", "No matches"). Nesting arrays inside arrays or passing an empty array to a LAMBDA produces the same code.

#GETTING_DATA

The only “error” that fixes itself. It appears while Excel waits on an external source — STOCKHISTORY, linked data types (Stocks, Geography), or a Power Query/cube connection still refreshing. Give it a few seconds. If it persists for minutes, check your internet connection, then force a refresh with Ctrl+Alt+F5 (Refresh All).

Reading Errors as a Chain

Errors propagate. If A1 shows #VALUE! and B1 contains =A1*2, B1 shows #VALUE! too — the error you see is often three formulas downstream of the one that’s actually broken. Use Formulas > Error Checking > Trace Error to follow the chain back to its source, and test cells with ISERROR when you need formulas to react to upstream failures. Fix the root cell and the whole chain clears at once.

FAQ

How do I hide all errors in a worksheet without fixing them?

For printing, use Page Layout > Page Setup > Sheet tab > “Cell errors as” and choose blank. Within formulas, wrap calculations in =IFERROR(formula, ""). For the green triangle indicators specifically, see ignoring errors in Excel. Hiding is fine for cosmetic cases like #DIV/0! on incomplete data — but never blanket-suppress #REF! or #NAME?, which always indicate genuinely broken formulas.

What’s the difference between IFERROR and IFNA?

IFERROR catches every error type; IFNA catches only #N/A. For lookups, IFNA is safer: =IFNA(VLOOKUP(...), "Not found") shows “Not found” for missing values but still surfaces a #REF! or #VALUE! that means the formula itself is broken. IFERROR would silently swallow both.

Why does my formula show an error in one Excel version but not another?

Almost always #NAME? or #SPILL!, and almost always a function-availability gap. XLOOKUP, FILTER, SORT, and UNIQUE require Excel 2021 or Microsoft 365; TEXTSPLIT and LAMBDA require Microsoft 365. Older versions render them as #NAME?. If the file must work in Excel 2019 or earlier, stick to VLOOKUP/INDEX-MATCH and classic formulas.

What does a green triangle in the corner of a cell mean?

It’s a warning from Excel’s background error checker, not an error value — flagging things like numbers stored as text or a formula inconsistent with its neighbors. The cell may calculate fine. Click the cell, then the exclamation icon, to see the specific concern and either fix or dismiss it.

Can conditional formatting highlight every error cell at once?

Yes. Select your range, then Home > Conditional Formatting > New Rule > “Use a formula” and enter =ISERROR(A1) (using the top-left cell of your selection). Pick a fill color and every cell containing any error lights up — the fastest way to audit a large inherited workbook.

Related guides

How To

How to Fix Ref in Excel

Learn how to fix Ref errors in Excel with our step-by-step guide. Avoid the frustration of broken formulas and get back to efficient data analysis.

May 20, 2023

View all Excel Errors guides →