#REF! error in Excel: what it means and how to fix it
#REF! means a formula points at a cell that isn't there: deleted, or past the edge of a range. The usual causes and fixes, with a practice sheet.
#NAME? means Excel read a word in your formula that it doesn’t recognise. Apart from cell references, every word in a formula must be something Excel knows: a function such as SUM or IF, a name given to a range or table, TRUE or FALSE, or text inside double quotes. Anything else, and the formula shows #NAME?. The fix is to find that word, and the formula bar shows it to you.
=SUMM(B2:B4) or =VLOKUP(E2,A2:C6,3,FALSE): Excel has no function by that name, so it can’t work the formula out. Correct the spelling.
To avoid it, type the first letters after = and pick the function from the list Excel shows, with Tab. Or type function names in lower case: when you press Enter, Excel turns every name it recognises into capitals, so =sum(b2:b4) becomes =SUM(B2:B4). If you typed in lower case, a function name still in lower case is the misspelt one.
Text inside a formula needs double quotes. Without them, Excel reads Pass and Fail as names, finds no range with those names, and shows #NAME?:
| Row | A | B | C |
|---|---|---|---|
| 1 | Student | Score | Result |
| 2 | Ana | 72 | #NAME? |
Put each word in straight double quotes:
=IF(B2>=50,"Pass","Fail") → PassWatch out for curly quotes (“Pass”) pasted from a word processor or a chat: Excel only accepts the straight “ kind.
A range is written with a colon between its first and last cell. Without it, B2B4 looks like a name, not a range:
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Month | Sales | Total | |
| 2 | Jan | 1200 | #NAME? | |
| 3 | Feb | 950 | ||
| 4 | Mar | 1430 |
Put the colon back:
=SUM(B2:B4) → 3580=SUM(Sales) works only if the workbook has a range called Sales. If the name was never created, was deleted, or is spelt differently, the formula shows #NAME?. Open Formulas › Name Manager to see the names that exist, and pick them from Formulas › Use in Formula instead of typing them.
Newer functions such as XLOOKUP, FILTER and UNIQUE exist only in Excel 365 and Excel 2021 or later. Open a file that uses them in an older version and the formula bar shows _xlfn. in front of the function’s name; the cells keep their last saved result until the formula recalculates, then show #NAME?. Nothing is wrong with the formula; that version can’t run it. For files shared with older versions, use functions they have, such as INDEX and MATCH. A function from an add-in, such as EUROCONVERT, also shows #NAME? until its add-in is turned on.
Your task: In C2, show Pass when the score in B2 is 50 or more, and Fail otherwise.
Graded live| Row | A | B | C |
|---|---|---|---|
| 1 | Student | Score | Result |
| 2 | Maya | 49 |
Write the formula in the bar above, then press Check or Enter.
IF takes a test, the result when it's true, and the result when it's false. Put both words in double quotes.
=IF(B2>=50,"Pass","Fail") Any formula that returns the same result passes.
IFERROR can turn #NAME? into a blank or a 0, but that only hides a formula that can never work. Unlike #N/A, which can be a normal “not found”, #NAME? always means something in the formula is wrong: fix it instead.
Excel found a word in the formula that it can't match to a function, a defined name or a range. Usually it's a typo, or text that needs double quotes.
Text results need double quotes. =IF(B2>=50,Pass,Fail) shows #NAME?; =IF(B2>=50,"Pass","Fail") works.
That computer runs a version of Excel without XLOOKUP, such as Excel 2019 or earlier. The formula shows _xlfn. in front of the name, and once it recalculates it returns #NAME?. Use INDEX and MATCH, or VLOOKUP, in files shared with older versions.
Click the cell and read the formula bar. Look for a function name Excel didn't capitalise (if you typed in lower case), a word that isn't in quotes, or a range without its colon.
Guides that build on this one.
#REF! means a formula points at a cell that isn't there: deleted, or past the edge of a range. The usual causes and fixes, with a practice sheet.
#VALUE! means a formula got the wrong kind of value, most often text where it needs a number. The usual causes and fixes, with a practice sheet.
#DIV/0! means a formula divided by zero or by an empty cell. Why it happens, averages of nothing included, and how to show a clean result, with a practice sheet.
Practise in a live grid that grades what your formula calculates, with a specific hint when it's wrong.
Runs in your browser · Graded on your result · No install