Excel errors

#NAME? error in Excel: causes and how to fix it

Fix #NAME? in Excel: misspelled functions, text without quotes, missing names, missing colons, new functions in old versions, LET typos and macros.

#NAME? means "I don't recognise this name". Somewhere in the formula there is a word that Excel cannot match to a function, a named range, a table, or a LET or LAMBDA variable. Usually it is a typo, text without quotation marks, or a function that your version of Excel does not have. The question mark is apt: Excel is asking you what you meant. Because #NAME? comes from the formula text, not from the data, it is usually the quickest error to fix once you know where to look. Every cause below comes with a small sheet that reproduces it. For the overview of all error values see Formula errors: what each one means and how to fix it.

What #NAME? means

When Excel reads a formula, every word that is not a number, a cell address or text in quotes must be something it knows: a built-in function such as SUM, a defined name such as VAT_rate, a table name such as Sales[Amount], or a variable created by LET or LAMBDA. If a word matches none of these, the formula is still accepted, but the result is #NAME?. A handy clue: when you type a known function, Formula AutoComplete offers it and Excel converts it to capitals after you press Enter. A function that stays in lower case (=summ(B2:B4)) was not recognised.

Cause 1: a misspelled function name

B5fx=SUMM(B2:B4)
AB
1ExpenseAmount
2Hotel120
3Taxi75.5
4Meals40
5Total#NAME?

There is no function called SUMM.

Result: #NAME?

B5fx=SUM(B2:B4)
AB
1ExpenseAmount
2Hotel120
3Taxi75.5
4Meals40
5Total235.5

Corrected: 120 + 75.5 + 40 = 235.5.

Result: 235.5

Fix. Correct the spelling. To avoid typos, type = and the first letters, then pick the function from the AutoComplete list with the arrow keys and Tab. Common slips: VLOKUP, CONCATINATE, COUNTIFS typed as COUNTIFS( with a missing letter, or AVERAGEIFS typed as AVERAGEIF S.

Cause 2: text without quotation marks

Text values inside a formula must be in double quotes. Without them, Excel thinks the word is a name:

C2fx=IF(B2=Paid, "Done", "Chase")
ABC
1InvoiceStatusAction
2INV-204Paid#NAME?

Paid without quotes is read as a name, and no such name exists.

Result: #NAME?

C2fx=IF(B2="Paid", "Done", "Chase")
ABC
1InvoiceStatusAction
2INV-204PaidDone

With quotes, "Paid" is compared as text.

Result: Done

A related trap is curly quotes (“Paid”) pasted from Word, email or a web page. Excel only accepts straight double quotes, so a formula copied from a document can fail even though it looks perfect; retype the quote marks in Excel.

Cause 3: a named range that does not exist

Names such as VAT_rate or Sales2026 make formulas readable, but only if the name is defined in this workbook. A formula copied from another file, a name deleted in the Name Manager, or a small spelling difference (VATrate versus VAT_rate) all give #NAME?.

C2fx=B2*VATrate
ABC
1ItemNetVAT
2Desk250#NAME?

The workbook has a name called VAT_rate, not VATrate.

Result: #NAME?

Fix. Open Formulas › Name Manager (Ctrl+F3) to see which names exist and what they refer to. Use Formulas › Use in Formula to insert a name without typing it. If the name is missing, define it again with Formulas › Define Name. With a name VAT_rate that refers to a cell containing 20%, =B2*VAT_rate returns 50. See Named ranges: give cells meaningful names.

Cause 4: a missing colon in a range

B5fx=SUM(B2B4)
AB
1ExpenseAmount
2Hotel120
3Taxi75.5
4Meals40
5Total#NAME?

B2B4 is not a cell address, so Excel treats it as an unknown name.

Result: #NAME?

Fix. Add the colon: =SUM(B2:B4). Selecting ranges with the mouse while writing a formula instead of typing them avoids this entirely.

Cause 5: a function that is newer than your version of Excel

This is the cause that confuses people most, because the formula works on the author's computer. Functions such as XLOOKUP, FILTER, UNIQUE, LET, TEXTSPLIT, VSTACK and GROUPBY only exist in recent versions. When a workbook that uses them is opened in an older Excel, the cells show #NAME? after recalculation, and the formula bar shows the function with a _xlfn. prefix:

Formula
=_xlfn.XLOOKUP(A2, Codes, Prices)
How an XLOOKUP formula looks when opened in Excel 2019 or older. The prefix marks a function this version does not know.

Fix. Either the person opening the file needs a version that has the function (Microsoft 365, or Excel for the web, which is free with a Microsoft account), or the formula must be rewritten with older functions, for example =INDEX(Prices, MATCH(A2, Codes, 0)) instead of XLOOKUP. If you share files widely, check each function's availability on its page on this site before using it. File › Info › Check for Issues › Check Compatibility lists functions that older versions cannot calculate.

FunctionFirst available in
IFS, MAXIFS, TEXTJOIN, CONCAT, SWITCHExcel 2019
XLOOKUP, FILTER, SORT, UNIQUE, SEQUENCE, LETExcel 2021
LAMBDA, TEXTSPLIT, VSTACK, TAKE, TOCOLExcel 2024
GROUPBY, PIVOTBY, REGEXTEST, TRIMRANGE, PYMicrosoft 365 only

Cause 6: a function name in another language

Excel translates function names in localised versions: SUM is SUMME in German, SOMME in French and SUMA in Spanish. A formula typed from a tutorial in another language returns #NAME? because the English version does not know SUMME. Fix: use the local name, or the English name in an English Excel. When you open a file, Excel translates the functions automatically; the problem only appears when formulas are typed or pasted as text. Note that the argument separator may also differ: many European versions use a semicolon (;) instead of a comma.

Cause 7: a typo in a LET or LAMBDA variable

LET lets you name intermediate results. Every later use of the variable must match its definition exactly, otherwise Excel looks for a workbook name of that spelling and finds none.

C2fx=LET(rate, 0.2, B2*(1-rat))
ABC
1ProductPriceDiscounted
2Chair50#NAME?

The variable is rate, but the calculation uses rat.

Result: #NAME?

C2fx=LET(rate, 0.2, B2*(1-rate))
ABC
1ProductPriceDiscounted
2Chair5040

Corrected: 50 × (1 - 0.2) = 40.

Result: 40

The same happens with LAMBDA parameters and with custom LAMBDA functions defined in the Name Manager: if a workbook that defines =PROFITMARGIN(...) is not the one you are working in, the custom function is unknown here. Copy the name definition into this workbook.

Cause 8: macros, add-ins and custom functions that are not loaded

Custom functions written in VBA (user-defined functions, see User-defined functions (UDFs): your own worksheet functions) only work while their code is available. If the file was saved as .xlsx (which strips macros), if macros are disabled, or if the function lives in a personal macro workbook or add-in that is not open on this computer, the cells show #NAME?. Add-in functions from older days, such as EUROCONVERT, behave the same way when the add-in is not installed. Fix: save as .xlsm, enable macros for trusted files, or install the add-in under File › Options › Add-ins.

How to find every #NAME? in a workbook

  1. Go To Special. Press F5 or Ctrl+G (the same on a Mac), click Special, choose Formulas and leave only Errors ticked, then OK. Excel selects every formula on the sheet that shows an error, of any kind. Give the selection a fill colour so the cells stay visible after you click away.
  2. Find All. Press Ctrl+F (Cmd+F), type #NAME?, open Options, set Look in to Values, tick Match entire cell contents, set Within to Workbook and click Find All. The list at the bottom shows sheet, cell and formula for every hit; Ctrl+A inside the list selects them all.
  3. Error Checking. Formulas › Formula Auditing › Error Checking jumps from one error to the next and offers Show Calculation Steps, which opens Evaluate Formula on that cell so you can see the exact step that fails.
  4. Trace Error. Select an error cell and choose Formulas › Error Checking (the arrow beside it) › Trace Error. Red arrows lead back to the cell where the error started; blue arrows show the healthy inputs. Errors travel downstream, so fixing the first cell often clears dozens of others.
  5. Count them with a formula. =COUNTIF(B2:B500, "#NAME?") counts the cells in a range that show this error, and =SUMPRODUCT(--ISERROR(B2:B500)) counts every kind of error. Put the count next to a report total as an early-warning light.
  6. Search for _xlfn. with Look in: Formulas to list every formula that uses functions your version does not support.
  7. Check the Name Manager. Names that refer to #REF! or are spelled differently from the formulas that use them are a frequent source of #NAME?.

When you should NOT hide #NAME?

Never hide #NAME? with IFERROR. The formula is not calculating anything at all, so whatever replacement you choose is a guess presented as a result. Worse, the #NAME? may only appear on some computers (Cause 5 and 8), so an IFERROR that shows 0 would give different people different totals from the same file without anyone noticing. Fix the formula, or rewrite it with functions every recipient has.

Version notes

  • #NAME? exists in every version of Excel.
  • The _xlfn. prefix is how Excel 2010 and later mark functions that were added after the version you are using. In Excel 2007 and older the prefix may be missing and you simply see #NAME?.
  • Excel for the web always has the newest functions, so it is a quick way to open a file from a Microsoft 365 user when your desktop version is older.
  • Google Sheets has its own set of functions; a formula that works in Excel may return #NAME? there, and the other way round.

Check yourself

1. =IF(A2=Yes, 1, 0) returns #NAME?. What is wrong?

2. A colleague sees =_xlfn.XLOOKUP(...) and #NAME? in a file that works for you. Why?

3. Which tool shows every defined name in a workbook?

4. =SUM(B2B9) returns #NAME? because…

More excel errors