Excel tutorial
/

Excel basics

Intermediate

Excel formula errors: #DIV/0!, #N/A, #VALUE!, #REF!, #NAME? and how to fix them

What #DIV/0!, #N/A, #VALUE!, #REF!, #NAME?, #NUM!, #SPILL! and #### mean in Excel, what causes them and how to fix them with IFERROR and IFNA.

When a formula can’t produce a result, Excel puts an error value starting with # in the cell. It doesn’t mean “Excel is broken” — on the contrary, Excel is telling you exactly what it didn’t like. Every error has its own meaning, and once you can read them, you’ll find the cause in seconds.

Importantly, errors propagate. One #N/A flows into every formula that depends on it — the total, the average, the report. So always look for the first source of the error.

Книга1 - Excel
—☐✕
fx
ABCD
1ErrorIn shortTypical cause
2#DIV/0!division by zerodivisor cell is 0 or blank
3#N/Avalue not foundVLOOKUP found no match
4#VALUE!wrong data typea number added to text
5#REF!reference losta row or column was deleted
6#NAME?name not recognizedtypo in a function name
7#NUM!invalid numbersquare root of a negative
8#SPILL!result can’t fita filled cell is in the way
9
Готово
The 7 main Excel errors. In other language versions of Excel they look different (Russian: #ДЕЛ/0!, #Н/Д, #ЗНАЧ!, ...)

#DIV/0! — division by zero

Appears when the divisor is 0 or a blank cell (Excel treats blank as zero). Most often it shows up in rows that aren’t filled in yet: the average receipt of a branch that has no receipts yet.

Fix: check the divisor first — =ЕСЛИ(C2=0;"—";B2/C2). Or shorter: =ЕСЛИОШИБКА(B2/C2;"—").

Книга1 - Excel
—☐✕
E4fx=ЕСЛИ(C4=0;"—";B4/C4)
ABCDEF
1BranchSalesReceiptsAvg receiptFixed
2Chilanzar12 500 00025050 00050 000
3Yunusabad9 800 00019650 00050 000
4Sergeli00#DIV/0!1—
5
Готово
Sergeli has no receipts yet: =B4/C4 gives #DIV/0!. The IF in column E shows a dash instead

#N/A — value not available

Appears when VLOOKUP, XLOOKUP or MATCH can’t find what they look for. Three main causes:

  • The value really isn’t in the lookup table.
  • An invisible extra space: “Milk ” and “Milk” are different text to Excel.
  • Number vs text: 125 is a number in one table and “125” is text in the other — they are not equal.

Fix: strip spaces with TRIM, make the types match. If the value may genuinely be missing, use =ЕСНД(ВПР(...);"Not found"). XLOOKUP has a dedicated argument for this: =ПРОСМОТРX(A2;E:E;F:F;"Not found").

Книга1 - Excel
—☐✕
C3fx=ЕСЛИОШИБКА(ВПР(СЖПРОБЕЛЫ(A3);$E$2:$F$4;2;ЛОЖЬ);"Not found")
ABCDEFG
1ProductPriceWith TRIMProductPrice
2Bread4 0004 000Bread4 000
3Milk 1#N/A12 000Milk12 000
4Yogurt2#N/ANot foundEggs1 500
5
Готово
1 — “Milk ” ends with a space; TRIM fixes it. 2 — “Yogurt” isn’t in the lookup table at all

#VALUE! — wrong type of value

Appears when a formula expects a number but meets text: a cell with “5 kg” or “12 000 UZS”, a date that became text, an invisible character.

An interesting difference: the + operator returns #VALUE! when it meets text, but SUM silently skips text. =B2+B3+B4 shows an error, while =СУММ(B2:B4) shows no error but returns a wrong total — which is even more dangerous.

Fix: move units into a separate column or the header (“Weight, kg”) so the cell holds only a number.

Книга1 - Excel
—☐✕
fx
ABCDE
1ProductWeightPrice/kgTotal
2Apples5 kg115 000#VALUE!
3Pears322 00066 000
4Grapes418 00072 000
5Total#VALUE!2
6
Готово
1 — “5 kg” is text and can’t be multiplied. 2 — the error flowed down the chain into “Total”

#REF! — the reference is gone

The cell the formula pointed to no longer exists: a row, column or sheet was deleted. The formula turns into =B2*#REF! and won’t heal by itself.

  • Noticed right away? Undo the deletion with Ctrl + Z.
  • Formulas like =B2+B3+B4 return #REF! when a row is deleted, while =СУММ(B2:B4) just shrinks the range and keeps working. Range-based functions are safer.
  • A formula copied upward from row 1 also gives #REF!: there are no rows above.

#NAME? — Excel doesn’t recognize a name

  • A typo in the function name: =SUMM(B2:B5), =VLOKUP(...).
  • Text without quotes: =ЕСЛИ(B2>=60;Pass;Fail) — Excel looks for “Pass” as a name.
  • A missing colon in a range: =СУММ(B2B5).
  • A named range that doesn’t exist: =СУММ(Sales), but the name “Sales” was never created.
  • A new function in an old Excel: XLOOKUP, FILTER and UNIQUE don’t exist in Excel 2016.

To avoid it, pick functions from the list with Tab — Excel spells the name correctly for you.

#NUM!, #SPILL!, #NULL! and ####

  • #NUM! — mathematically impossible: =КОРЕНЬ(-4), a number that is too large (=10^400), IRR or RATE couldn’t find a solution.
  • #SPILL! — Excel 365 dynamic array functions (FILTER, UNIQUE, SORT, SEQUENCE) “spill” results into neighboring cells. If even one cell in the way is filled, you get #SPILL!. Clear the blocking cell.
  • #NULL! — a space instead of a comma or colon between ranges: =СУММ(B2 B5).
  • #CALC! — in Excel 365, for example when FILTER finds no rows. The third argument solves it: =ФИЛЬТР(A2:C20;C2:C20>100;"None").
  • #### — not an error at all! The column is too narrow for the number. Double-click the column border. If #### remains after widening, the cell holds a negative date or time.
Книга1 - Excel
—☐✕
C2fx#SPILL!
ABCD
1CityUnique cities
2Tashkent#SPILL!
3Samarkand
4Tashkentnote1
5Bukhara
6Samarkand
7
Готово
=UNIQUE(A2:A6) in C2 wants to output three cities into C2:C4, but the “note” in C4 blocks the way

Finding and fixing an error fast

1

Select the error cell — a yellow ⚠ icon appears next to it. Click it to open a menu with the error type and Show Calculation Steps...: Excel evaluates the formula step by step and shows where it “broke”.

Книга1 - Excel
—☐✕
D4fx#DIV/0!
ABCDE
1BranchSalesReceiptsAvg receipt
2Chilanzar12 500 00025050 000
3Yunusabad9 800 00019650 000
4Sergeli00#DIV/0!Ошибка деления на нольСправка по этой ошибкеПоказать этапы вычисления...Пропустить ошибкуИзменить в строке формулПараметры проверки ошибок...
5
Готово

2

Press F2 — every reference in the formula gets a colored border. The borders show you which cell is causing the problem.

3

If the error came from another formula, walk up the chain: Trace Precedents on the Формулы tab draws arrows to the cells the formula depends on. Fix the first cell with an error and the rest disappear on their own.

4

To find every error on a big sheet at once: Главная → Найти и выделить → Go To Special....

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить
Буфер обмена
Calibri ▾11 ▾
Шрифт
Выравнивание
Общий ▾
Число
Условное форматированиеФорматировать как таблицуСтили ячеек
Стили
ВставитьУдалитьФормат
Ячейки
АвтосуммаСортировка и фильтрНайти и выделить
Редактирование
fx
ABCDE
1BranchSalesReceiptsAvg receipt
2Chilanzar12 500 00025050 000
3Yunusabad9 800 00019650 000
4Sergeli00#DIV/0!
5
Готово

5

In the dialog choose Formulas and leave only Errors checked. After OK, every formula with an error on the sheet is selected — easy to review or highlight.

Книга1 - Excel
—☐✕
fx
ABCDE
1BranchSalesReceiptsAvg receipt
2Chilanzar12 500 00025050 000
3Yunusabad9 800 00019650 000
4Sergeli00#DIV/0!
5
Готово

IFERROR and IFNA — replacing an error with a clear answer

  • =ЕСЛИОШИБКА(value; value_if_error) — if the formula returns any error, the second argument is returned instead: =ЕСЛИОШИБКА(B2/C2;0).
  • =ЕСНД(value; value_if_na) — catches only #N/A and lets other errors show. That is exactly what lookup functions need: =ЕСНД(ВПР(A2;$E$2:$F$50;2;ЛОЖЬ);"Not found").

For the second argument use 0, empty text "" or a note (“Not found”) — whatever reads best in the report.

Example

ABC
1SalesReceiptsAvg receipt
25000000=IFERROR(A2/B2,0)

Formula:

=IFERROR(A2/B2,0)

→ result: 0

Pro level: working with a column that contains errors

  • Sum around errors. One #N/A in a column makes =СУММ(D2:D100) return an error too. =AGGREGATE(9;6;D2:D100) adds up while skipping errors (9 = SUM, 6 = ignore errors). Use 1 for AVERAGE, 4 for MAX, 5 for MIN.
  • Count the errors: =СУММПРОИЗВ(--ЕОШИБКА(D2:D100)) tells you how many errors a column has. Keep it as a check cell before you send a report.
  • Count only #N/A: =СУММПРОИЗВ(--ISNA(D2:D100)) — how many products are missing from the lookup table.
  • #N/A on purpose: to stop a chart from plotting 0 for a missing point, put =NA() in the cell — a line chart skips that point.
  • The green triangle is a warning, not an error (number stored as text, a formula unlike its neighbors). Choose which ones appear under File → Options → Formulas → Error checking rules.

Try it in the simulator

Calculate the average receipt safely in D2: =ЕСЛИ(C2=0;0;B2/C2) and fill it down to D4. Then write the same with IFERROR in E2: =ЕСЛИОШИБКА(B2/C2;"—") and compare the results.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1BranchSalesReceiptsAvg (IF)Avg (IFERROR)
2Chilanzar12500000250
3Yunusabad9800000196
4Sergeli00
5
6
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

22 / 154