The #NAME? error in Excel: what it means and how to fix it
#NAME? means Excel found a word in your formula that it doesn't know. Usually a function name is misspelt, such as =SUMM(B2:B9), some text is missing its quote marks, or the function is too new for your version of Excel. Click the cell, read the formula in the formula bar, and fix the word. The causes are the same on Windows and Mac and in Excel for the web.
Causes and fixes at a glance
| What you see | Why | Fix |
|---|---|---|
=SUMM(B2:B9) or =VLOKUP(…) | The function name is misspelt | Correct it, or pick it from the list as you type |
=IF(B2>=50,Pass,Fail) | Text without double quotes | "Pass" and "Fail" |
=SUM(B2B9) | The colon is missing from the range | B2:B9 |
=SUM(Sales) | No range has that name in this workbook | Check the Name Manager, or make the name |
_xlfn. in front of a function | The function is newer than your Excel | Use an older function, or a newer Excel |
Each one is worked through below.
A misspelt function, a missing colon, an unknown name
All three of these show #NAME? for the same reason: Excel reads a word it doesn't know. SUMM isn't a function. B2B5, with no colon, isn't a cell or a range. And Sales is just a word unless a range has been given that name.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Cost | What went wrong | Total |
| 2 | Paper | £12.00 | Misspelt function | #NAME? |
| 3 | Pens | £8.50 | Missing colon | #NAME? |
| 4 | Ink | £24.00 | A name that isn't set up | #NAME? |
| 5 | Labels | £5.50 | Fixed | £50.00 |
To avoid a misspelt function, let Excel finish the name for you. Type =VL and a list of functions appears. Press Tab to pick the one highlighted, or use the arrow keys first. It works the same way in Excel for Mac. If no list appears as you type, the start of the name is wrong.
For a name such as Sales, go to Formulas › Name Manager to see the names the workbook has. It's on the Formulas tab in Excel for Mac too. Fix the spelling in the formula, or make the name: select the range, type the name in the Name Box to the left of the formula bar, and press Enter. A formula copied from another workbook often brings a name with it that this workbook doesn't have.
Words without quote marks
Text inside a formula needs double quotes. Here, B2 is a test score and the pass mark is 50:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Pupil | Score | Result | With quotes |
| 2 | Ava | 62 | #NAME? | Pass |
| 3 | Leo | 41 | #NAME? | Fail |
Without quotes, Excel takes Pass to be the name of something, such as a named range, and can't find it. Numbers and cell addresses don't need quotes. Use straight double quotes, ": curly quotes pasted from Word or an email aren't quote marks to Excel.
The same goes for the condition in COUNTIF, SUMIF and the other IFS functions. To count the North rows, North needs quotes:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Sales | Without quotes | With quotes | |
| 2 | North | £1,200.00 | #NAME? | 2 | |
| 3 | South | £800.00 | |||
| 4 | North | £950.00 | |||
| 5 | East | £700.00 |
Better still, type North in a cell and point at it, such as =COUNTIF(A2:A5,G1). A cell address needs no quotes, and you can change what it counts without touching the formula. See COUNTIF.
A newer function in older Excel
This one catches out schools and offices on Excel 2016 or 2019. A spreadsheet made in Microsoft 365 opens fine, but formulas using newer functions show #NAME?, and the formula bar may show _xlfn. in front of the name. The usual ones are:
- XLOOKUP and XMATCH: use VLOOKUP, or INDEX with MATCH.
- FILTER, UNIQUE, SORT and SEQUENCE: use a filter, Remove Duplicates or Sort on the Data tab (the same tab on a Mac).
- TEXTSPLIT, TEXTBEFORE and TEXTAFTER: use LEFT, MID and RIGHT with FIND.
- LET, VSTACK, GROUPBY and other recent ones: rewrite without them, or use a PivotTable.
To check your version: on Windows, File › Account › About Excel; on a Mac, Excel › About Microsoft Excel. If you share a workbook with people on older Excel, stick to the older functions. If they open it and see #NAME? on an XLOOKUP, that's the reason, and the workbook isn't broken for anyone on Microsoft 365.
Finding it quickly
Click the cell and read the formula in the formula bar. Function names Excel knows are turned into capitals when you press Enter, so a name still in small letters, such as =summ(B2:B9), is one it didn't recognise. The part of the formula that's wrong is often the only word that isn't a function, a cell or something in quotes.
If the formula is long, click the warning sign next to the cell. It names the error, and on Windows Show Calculation Steps works through the formula a piece at a time until it reaches the bad word.
#NAME? isn't the only error with a fixable cause: #REF! means a cell the formula used has gone, and #DIV/0! means it divided by zero.
Try it now
Someone typed =IF(B2>=$F$2,Pass,Fail) here and got #NAME?. In C2, fix it so it shows Pass when the score is at least the pass mark in F2, and Fail otherwise. Your formula will be copied down to C7.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Pupil | Score | Result | Pass mark | ||
| 2 | Ava | 62 | 50 | |||
| 3 | Leo | 41 | ||||
| 4 | Maya | 50 | ||||
| 5 | Sami | 77 | ||||
| 6 | Isla | 49 | ||||
| 7 | Kofi | 58 |
Open this in Try a formula: the same sheet with the answer filled in, to change or share by link.
Part of Excel data analysis practice: every lesson on the topic, with a project in Excel.
Where it works
#NAME? and its fixes are the same in every version of Excel, on Windows and Mac, and in Excel for the web. Which functions count as "too new" depends on your version: XLOOKUP, FILTER and UNIQUE need Excel for Microsoft 365 or Excel 2021 and later.
Questions
What does #NAME? mean in Excel?
It means Excel found a word in the formula that it doesn't recognise. The usual reasons are a misspelt function such as SUMM or VLOKUP, text that needs double quotes round it, a range with its colon missing, a named range that doesn't exist in this workbook, or a function that's newer than your version of Excel. Click the cell and read the formula bar to find the word.
Why does XLOOKUP give #NAME? in Excel?
XLOOKUP is in Excel for Microsoft 365 and Excel 2021 and later. In Excel 2019, 2016 or older it isn't a function, so Excel shows #NAME?, and the formula bar may show _xlfn. in front of it. Use VLOOKUP, or INDEX with MATCH, which work in every version. The same goes for FILTER, UNIQUE, SORT, TEXTSPLIT and LET.
How do I fix #NAME? in an IF formula?
Check every word in the formula has double quotes round it. =IF(B2>=50,Pass,Fail) gives #NAME? because Pass and Fail have no quotes, so Excel looks for something with those names. Write =IF(B2>=50,"Pass","Fail"). Numbers, TRUE and FALSE, and cell addresses such as F2 don't need quotes. Check the quotes are straight, too: curly ones pasted from Word don't count.
What does _xlfn mean in an Excel formula?
_xlfn. is a marker Excel puts in front of a function your version doesn't have, such as =_xlfn.XLOOKUP(…). It shows the workbook was made in a newer Excel. The cell shows #NAME? until it's opened in a version that has the function. Either open it in Microsoft 365 or Excel for the web, or rewrite the formula with older functions.