How to Fix the #NAME? Error
#NAME? means the formula contains a word the spreadsheet does not recognize. Usually a function name is misspelled, text is missing its quotation marks, or the function does not exist in your version of Excel. Describe what you need below and get a correctly written formula.
Free, no sign-up required · 5 free generations a day
Last updated
Describe your task, get the formula
Type what you need in plain English, or pick an example below. You get the formula, a step-by-step explanation, and a worked example.
Correct forms of formulas that often cause #NAME?
=VLOOKUP(A2,$D$2:$E$100,2,FALSE)
=IF(A2="Yes",1,0)
=SUM(A2:A10)Function names must be spelled exactly, text values must sit inside double quotes, and a range needs its colon. Without quotes, Yes is read as a named range; without the colon, A2A10 is read as a name too. Neither exists, so the result is #NAME?.
Examples
Put text values in quotes
=IF(A2="Yes","Approved","Pending")Every piece of text in a formula needs double quotes. Writing =IF(A2=Yes,...) makes Excel look for a named range called Yes and return #NAME?.
Replace XLOOKUP in older Excel
=INDEX($E$2:$E$100,MATCH(A2,$D$2:$D$100,0))XLOOKUP only exists in Excel 2021 and Microsoft 365. INDEX MATCH does the same job in every version, so the file opens without #NAME? anywhere.
Replace TEXTJOIN in older Excel
=A2&" "&B2TEXTJOIN needs Excel 2019 or later. The ampersand operator joins cells in any version and gives the same result for a small number of cells.
Common mistakes and how to fix them
The formula shows _xlfn. before a function name
The file was built in a newer Excel and uses a function yours does not have, such as XLOOKUP, FILTER or UNIQUE. Rewrite it with functions available in your version.
Curly quotes copied from a web page or document
Excel only accepts straight double quotes. Retype the quotation marks inside the formula bar instead of pasting them.
A named range was deleted or misspelled
Open Formulas, Name Manager in Excel, or Data, Named ranges in Google Sheets, and check that the name exists and is spelled the same way in the formula.
Frequently asked questions
What does #NAME? mean?
It means the formula contains text the spreadsheet cannot identify as a function, a named range or a quoted string.
How do I avoid misspelling function names?
Start typing the function and pick it from the autocomplete list with Tab. If you type a function in lower case and it stays lower case after pressing Enter, it was not recognized.
Why does a formula work in Excel but give #NAME? in Google Sheets?
A small number of functions exist in only one of the two programs, and some have different names. Ask for the Google Sheets version of the formula to get the equivalent.
Don't want to write it by hand?
Describe what you need in plain English and get a ready-to-use formula in seconds.
Try the formula generator