Lesson 55 of 92 · Free Excel Course
Excel
Excel Formula Not Working? Every Excel Error and How to Fix It
Fix any Excel formula not working: what #N/A, #VALUE!, #REF!, #DIV/0!, #NAME?, #SPILL!, #NUM!, #NULL!, #CALC! and #### mean, plus formulas that won't calculate.
When an Excel formula isn't working, it fails in one of two ways. Either the cell shows an error value like #N/A or #VALUE!, which means the formula ran and hit a problem, or there's no error at all: the formula sits there as text, shows an old answer, or adds up to the wrong total. This lesson covers both. For each error you get what it means, the usual causes, the fix, and a link to the lesson that teaches the function properly. The free practice workbook has one planted cause for every error, so you can break and fix each one yourself.
What each Excel error means
| You see | In plain words | Most common cause | First thing to try |
|---|---|---|---|
| #N/A | Not found | A lookup value isn't in the list | Check spelling and spaces; add IFNA |
| #VALUE! | Wrong kind of value | Maths on text, or a hidden space | Find the text cell; use SUM instead of + |
| #REF! | The cell is gone | A row, column or sheet was deleted | Ctrl+Z, or rebuild the reference |
| #DIV/0! | Divided by zero | The divisor is 0 or empty | Fill the cell, or IF / IFERROR |
| #NAME? | Unknown word | A misspelled function or name | Fix the spelling; quote text |
| #SPILL! | No room to spill | Something blocks the spill range | Clear the cells in the way |
| #NUM! | Impossible number | Bad argument, or no answer found | Check the inputs |
| #NULL! | Ranges don't meet | A space where a comma belongs | Use a comma or colon |
| #CALC! | Can't calculate | FILTER found nothing | Add FILTER's if_empty argument |
| #### | Can't display | Column too narrow, or a negative date | Widen the column; fix the date |
Find the cause in five steps
These steps work for any error. They use the desktop app on Windows.
- Click the cell and read the formula in the formula bar. Many errors are visible at a glance: a typo, a missing comma, a range like
B2:Bthat never ends. - Open the error menu. A green triangle in the cell's top-left corner means Excel's error checking has spotted something. Select the cell and click the warning icon that appears next to it. The menu names the problem and often offers a fix, such as Convert to Number or Show Calculation Steps.
- Step through it. Go to Formulas > Evaluate Formula and click Evaluate repeatedly. Excel works the formula out one piece at a time, so you can see exactly which part turns into the error.
- Trace the inputs. Formulas > Trace Precedents draws arrows to the cells the formula uses. If one of them shows an error, fix that cell first: errors pass down to every formula that uses them. The trace precedents lesson covers these tools in detail.
- Check the whole sheet. Formulas > Error Checking jumps from one flagged cell to the next.
On a Mac, the Formulas tab has the same Error Checking and Trace Precedents buttons, but Microsoft documents Evaluate Formula for Excel for Windows only. In Excel for the web some auditing commands are limited; if one is missing, open the file in the desktop app.
The ten error values and their fixes
Here's the Practice sheet. Column B holds the broken formulas; column D holds the fixed ones from the Answers sheet.
| A | B | C | D | |
|---|---|---|---|---|
| 9 | Error | Broken formula | Why it breaks | Fixed result |
| 10 | #N/A | #N/A | Erasers isn't in the list | Not stocked |
| 11 | #VALUE! | #VALUE! | D3 holds a hidden space | 25 |
| 12 | #REF! | #REF! | Column 4 of a 3-column table | $2.50 |
| 13 | #DIV/0! | #DIV/0! | Markers had 0 days on sale | n/a |
| 14 | #NAME? | #NAME? | AVERAGE is misspelled | $3.70 |
| 15 | #NUM! | #NUM! | DATEDIF dates are backwards | 364 |
| 16 | #NULL! | #NULL! | A space instead of a comma | 118 |
| 17 | #CALC! | #CALC! | No price is over $10 | None over $10 |
| 18 | #### | ######## | A negative number shown as a date | 364 |
#N/A: value not available
A lookup couldn't find the value. =XLOOKUP("Erasers",A2:A6,C2:C6) fails because there's no Erasers row. Other causes Microsoft lists: an extra space ("Pens " isn't "Pens"), a number stored as text on one side, and VLOOKUP's approximate match on an unsorted list. Fix the data first (TRIM removes extra spaces; see text functions). If a missing value is normal, show a message: =IFNA(XLOOKUP("Erasers",A2:A6,C2:C6),"Not stocked"). Learn more in the IFNA function and XLOOKUP and INDEX MATCH.
#VALUE!: wrong type of value
The formula wanted a number and got text. =B3-D3 fails because D3 looks empty but holds a single space, and a space is text. Fix the cell: select it and press Delete, or remove spaces from a whole column with Home > Find & Select > Replace (a space in Find what, nothing in Replace with). Or use a function: =B3-SUM(D3) returns 25, because SUM skips text while the minus sign can't. The formulas basics lesson explains how Excel treats text in a formula.
#REF!: invalid reference
The formula points at a cell that no longer exists, usually because you deleted a row, column or sheet. Press Ctrl+Z straight away to undo. A lookup asking for a column outside its table gives it too: =VLOOKUP("Pens",A2:C6,4,FALSE) asks for column 4 of a 3-column range, so change 4 to 3. Ranges like =SUM(B2:D2) survive deleted columns better than =B2+C2+D2. See VLOOKUP and HLOOKUP.
#DIV/0!: divided by zero
=B4/E4 divides by 0 (or by an empty cell). Put a number in the divisor, or catch it: =IFERROR(B4/E4,"n/a"), or Microsoft's suggestion =IF(E4,B4/E4,""), which only divides when E4 isn't zero or empty. See IF and IFS for IFERROR.
#NAME?: Excel doesn't recognise a name
Usually a typo: =AVERGE(C2:C6) instead of =AVERAGE(C2:C6). Other causes: text without quotes (=IF(A2=Yes,…) needs "Yes"), a range missing its colon, a named range that doesn't exist, or a newer function in an older Excel version. Start typing the function name and pick it from the list Excel shows, so the spelling is always right. Don't hide #NAME? with IFERROR: it always means the formula needs fixing. See formulas: the basics for how function names and text in quotes work.
#SPILL!: the result has no room
Dynamic array formulas like SORT, UNIQUE and FILTER spill their results into the cells below. If any of those cells holds something, you get #SPILL!.
| G | |
|---|---|
| 1 | Sorted products |
| 2 | #SPILL! |
| 3 | |
| 4 | blocker |
| 5 | |
| 6 |
Click the cell, open the warning icon and choose Select Obstructing Cells, then clear them. Spills also fail in merged cells, inside an Excel table (move the formula outside, or Table Design > Convert to Range) and past the edge of the sheet. More in find and remove duplicates, which uses UNIQUE.
#NUM!: a number Excel can't use
An argument is impossible, or a result is too big. =DATEDIF(DATE(2026,12,31),DATE(2026,1,1),"d") fails because DATEDIF needs the earlier date first; swap them and you get 364 (dates and times). Finance functions like IRR and RATE return #NUM! when they can't find an answer in their tries; giving them a guess often helps.
#NULL!: ranges that don't meet
A space between two ranges is Excel's intersect operator. =SUM(B2:B5 C2:C5) asks for the cells the two ranges share, and there are none. Use a comma to add two ranges, =SUM(B2:B5,C2:C5) (118), or a colon for one range. The add and sum lesson shows SUM with several ranges.
#CALC!: nothing to calculate
Most often FILTER found no rows: =FILTER(A2:A6,C2:C6>10) when every price is under $10. Add the third argument, =FILTER(A2:A6,C2:C6>10,"None over $10"). FILTER is covered in sort and filter.
####: the cell can't show its value
Not really an error. Either the column is too narrow (double-click the right edge of the column letter to fit it; see rows and columns), or a date or time cell holds a negative number. =DATE(2026,1,1)-DATE(2026,12,31) is -364, which can't be a date. Subtract the earlier date from the later one, or format the cell as Number.
When there's no error but the formula doesn't work
The formula shows as text
You typed =SUM(C2:C6) and the cell shows exactly that. Check three things:
- Show Formulas is on. Press Ctrl+` (the key above Tab) or click Formulas > Show Formulas to switch back. It's on the Formulas tab on Mac and Excel for the web too.
- The cell is formatted as Text. Go to Home, set the Number Format box to General, then press F2 and Enter to re-enter the formula. Changing the format alone doesn't wake it up. See format cells.
- Something sits before the =. A space or apostrophe turns the formula into text. Delete it.
Calculation is set to Manual
The formulas work but don't update when you change a number. Go to Formulas > Calculation Options and choose Automatic. Until then, F9 recalculates all open workbooks and Shift+F9 just the current sheet. On a Mac the setting is also under Excel > Preferences > Calculation. Excel for the web has the same Formulas > Calculation Options button, with choices including Automatic, Manual and Calculate Workbook.
A circular reference
A formula that includes its own cell, like =SUM(B2:B8) typed in B8, can't finish. Excel warns you, and the status bar shows Circular References: B8. To find every one, go to Formulas > Error Checking > Circular References and click each cell listed. Fix the range so it stops above the total: =SUM(B2:B6). Iterative calculation (File > Options > Formulas; on a Mac Excel > Preferences > Calculation) exists for models that loop on purpose; leave it off otherwise. Excel for the web has fewer circular reference tools, so use the desktop app to track one down.
Numbers stored as text
The total looks too low and there's no error. Numbers imported from other systems often arrive as text: left-aligned, with a green triangle.
| A | B | |
|---|---|---|
| 1 | Product | Units |
| 2 | Pens | 40 |
| 3 | Notebooks | 25 |
| 4 | Markers | 12 |
| 5 | Folders | 30 |
| 6 | Staplers | 18 |
| 7 | Total | 107 |
Select the cells, click the warning icon and choose Convert to Number. In a formula, multiplying by 1 converts the text: =SUMPRODUCT(B2:B6*1) gives 125. The import, export and convert lesson and the VALUE function cover bigger clean-ups.
Try it yourself
Download the practice workbook. The Practice sheet has a product list in A2:E6 and one broken formula per row in B10:B20, with the reason next to it. Type your fix in the yellow cell in column D. The Answers sheet has every fix, written out as text in column E.
- Fix #N/A, #REF! and #NAME? (B10, B12, B14).
- Fix #VALUE!, #DIV/0! and #NULL! (B11, B13, B16).
- Fix #NUM!, #CALC! and #### (B15, B17, B18).
- Re-enter the text formula in D19, and make B20's total 125.
- Type
=SORT(A2:A6)in G2, see #SPILL!, then delete G4. - Type
=SUM(B2:B8)in B8 to create a circular reference, find it with Error Checking, then fix it. - Switch to Manual calculation, change B2, press F9, then switch back to Automatic.
Common mistakes
- Hiding errors before reading them. Wrapping everything in IFERROR turns a deleted column (#REF!) into a silent blank. Fix first, then catch only the errors you expect.
- Changing Text to General and stopping there. The formula only calculates after you re-enter it (F2, Enter).
- Widening the column for a negative date. #### from a negative date stays no matter how wide the column is.
- Fixing the formula that shows the error, not the cell that caused it. One #N/A in an input flows into every total that uses it.
- Using IFERROR for lookups. IFNA catches only #N/A, so a typo still shows #NAME?.
- Leaving calculation on Manual. Someone else opens your file and trusts numbers that never updated.
What's next
You can now read any Excel error, find what caused it and fix it. The previous lesson, the Excel formulas list, links every formula in the course by task. Next, spreadsheet basics steps back to the words and ideas behind every spreadsheet. Or go back to the full Excel course.
Frequently asked questions
Why is my Excel formula not working?
If the cell shows an error like #N/A or #VALUE!, the formula ran but hit a problem: a missing lookup value, text where a number should be, a deleted cell. If it shows the formula itself, the cell is formatted as Text, there's a space or apostrophe before the =, or Show Formulas is on (press Ctrl+` to toggle it). If it shows an old answer, calculation is set to Manual: go to Formulas > Calculation Options > Automatic.
Why does Excel show the formula instead of the result?
Three usual causes: the cell was formatted as Text before you typed the formula, there's a space or apostrophe before the = sign, or Show Formulas is turned on. Fix the first by setting the cell to General and then pressing F2 and Enter to re-enter the formula. Changing the format alone isn't enough.
Why isn't my formula updating automatically?
The workbook's calculation is probably set to Manual. On the Formulas tab, click Calculation Options and pick Automatic. Until you do, press F9 to recalculate. All open workbooks share one mode, taken from the first workbook you open, so a file saved in Manual and opened first switches every file you open after it to Manual.
What does #N/A mean in Excel?
Not available: a lookup function (XLOOKUP, VLOOKUP, MATCH) couldn't find what you asked for. Check the spelling, extra spaces and whether one side is a number stored as text. To show a message instead, wrap it: =IFNA(XLOOKUP(A2,D2:D9,E2:E9),"Not found"). See the IFNA function.
Should I use IFERROR to hide errors?
Only after you know the formula is right. IFERROR hides every error, including the ones that point to a real mistake, like a typo (#NAME?) or a deleted cell (#REF!). Use it for expected gaps, like dividing by a month with no sales yet, and prefer IFNA for lookups so other errors still show.
How do I find a circular reference in Excel?
Look at the status bar at the bottom left: it says Circular References followed by a cell address. Or go to Formulas > Error Checking > Circular References and click a cell in the list to jump to it. Then change the formula so it doesn't include its own cell, for example a total that ends one row above itself.