ShareYourGroupShareYourGroupExcel Formulas

Guides

Excel formula errors and how to fix them

When Excel cannot work out a formula, it shows a short code that begins with a hash sign. These codes are not random. Each one names a particular kind of problem, and once you can read them, most errors take a minute to fix. This page goes through them one by one, with a real formula that produces each.

The errors at a glance

ErrorMeaning in plain words
#N/Athe value you looked for is not there
#VALUE!the wrong kind of data, such as text where a number is needed
#REF!the formula points to cells that no longer exist
#DIV/0!division by zero or by an empty cell
#NAME?Excel does not recognise a word in the formula
#NUM!a number that is impossible or out of range
#SPILL!results need more cells, and something is in the way
#CALC!a dynamic array formula has nothing to return
#####the column is too narrow, or a date is negative

#N/A: not available

A lookup did not find what it was looking for.

Causes and cures

To show something friendlier, wrap the formula in IFNA or use XLOOKUP's "not found" argument. See IFERROR.

#VALUE!: the wrong kind of value

The formula was given a type of data it cannot use.

D5 holds the text "12 kg", which cannot be multiplied. The second formula looks for a letter that is not in the cell.

Causes and cures

#REF!: an invalid reference

The formula refers to something that is not there.

The table has five columns and seven rows, and the formulas ask for column 9 and row 20.

Causes and cures

Deleting cells is the dangerous step. Clearing their contents with the Delete key leaves formulas intact. Removing the row or column itself breaks them.

#DIV/0!: division by zero

E5 holds 0. The second formula averages a column of text, so there are no numbers to divide by.

Causes and cures

Test before dividing: =IF(E5=0,"",D2/E5). That says precisely which case you are handling, which IFERROR does not.

#NAME?: Excel does not know that word

Excel met a word that is neither a function, a name nor quoted text.

Causes and cures

Typing function names in small letters is a quick test. Excel turns a name it recognises into capitals when you press Enter. One that stays small is misspelt.

#NUM!: an impossible number

Causes and cures

#SPILL! and #CALC!

These belong to the dynamic array functions of Excel 2021 and Microsoft 365, such as FILTER, SORT, UNIQUE and SEQUENCE.

#SPILL! means the formula needs to fill several cells and one of them is not empty. Click the cell with the error. A dashed border shows the area it needs. Clear whatever is inside it. Merged cells in the area cause the same error.

#CALC! means the formula has nothing to return, most often a FILTER with no matching rows.

Give FILTER its third argument, as in the second formula.

##### is not an error

A cell full of hash signs means the column is too narrow to show the number or date. Widen the column by double-clicking the border at the right of its heading. The value underneath is fine.

Hashes also appear when a date or time works out as negative, for example an end time minus a later start time. Fix the formula.

A circular reference

If a formula refers to its own cell, directly or through other cells, Excel shows a warning and usually a result of 0. =SUM(A1:A10) typed into A10 is the usual case: the total is inside its own range. The status bar at the bottom names a cell involved. Move the formula out of the range it adds.

A wrong answer with no error

The worst errors show no code at all. A total that leaves out the last rows, a lookup that returns the nearest match, an average that skips blanks: all look healthy. A few checks catch most of them.

Hiding errors

IFERROR replaces any error with a value of your choice. Use it on formulas that are known to be right and can fail for a known, harmless reason. Do not use it to silence an error you do not understand. The error is telling you something.

Every result on this page was calculated in Microsoft Excel (version 16.0, build 20326) on 12 November 2026, not typed by hand.

This is an independent help site. It is not connected with or approved by Microsoft. Excel and Microsoft 365 are trademarks of Microsoft Corporation, named here only to say which program a formula is for. The people and figures in the sample sheets are made up.