#NAME? Error in Excel and Google Sheets: Causes and Fixes
#NAME? means the spreadsheet does not recognize a function or name. Check a typo, unquoted text, a missing named range, or a function that does not exist here.
On this page
Tested in: Live formulas in Google Sheets, November 12, 2026. Notes about older Excel versions follow Microsoft’s function documentation and were not re-tested in a desktop Excel workbook on this date.
Which versions this applies to
#NAME? appears in both current Google Sheets (tested) and in Excel when a name cannot be resolved. Which names exist depends on the product and version. XLOOKUP worked in this Sheets file and returned 12.5. TEXTBEFORE, TEXTAFTER and TEXTSPLIT each returned #NAME? here; those are Excel 365 text functions, not Google Sheets functions.
Cause 1: A misspelled function name
=SUMM(1) returned #NAME?. So did =XLLOOKUP(B14,B14:B15,B15) and =IFEROR(1/0,0). The typo is one character off a real function, which makes it easy to miss on a long formula bar.
How to detect it: read the first token after =. If it is not a function you can find in the autocomplete list, or not one you have used successfully in this same file, treat it as a name error first.
How to fix it: correct the spelling. =SUM(1,2) in the same file returned 3. After a typo in a wrapper such as IFEROR, the inner expression never runs, so you also will not see the error that wrapper was meant to catch. =IFEROR(1/0,0) was #NAME?, not a hidden #DIV/0!.
Cause 2: Text that is not in quotes
=hello returned #NAME?. Sheets treats a bare word as a name, not as the text hello. ="hello" in the next row returned the text hello.
This shows up when someone types a label into a formula, or when a formula is built by concatenation and the quotes are left off. It is the same error as a missing named range, because that is how the spreadsheet is reading the token.
Cause 3: A named range that does not exist
=MissingNamedRange returned #NAME? in this file, which has no such name defined. The cell looks like a working reference until you check the name manager (Excel) or the named-range list (Sheets) and find nothing.
If you intended a cell reference, use A1 style or a real defined name. If you intended text, quote it.
Cause 4: A function that does not exist in this spreadsheet
This is the cause that wastes the most time, because the spelling is right for a different product.
In this Google Sheets file, =TEXTBEFORE("Ada Lovelace"," "), =TEXTAFTER("Ada Lovelace"," ") and =TEXTSPLIT("a,b",",") all returned #NAME?. Those functions exist in Excel 365, per Microsoft’s documentation. They do not exist as Sheets functions, and this file treated them as unknown names.
The other direction happens in Excel: XLOOKUP is not available in Excel 2016 or Excel 2019 according to Microsoft. In those versions a correctly spelled XLOOKUP can still be #NAME?. In this Sheets file the same function worked: =XLOOKUP(B14,B14,B15) returned 12.5 for SKU-101.
=VPR(B14,B14:B15,1,FALSE) also returned #NAME? here. VPR is the Spanish name for VLOOKUP. An English Google Sheets file does not accept that name. If you are moving a workbook between locale versions of Excel, check the function name, not just the arguments.
#NAME? is not a lookup miss
A missing key in XLOOKUP or VLOOKUP is #N/A. A VLOOKUP column index of 0 is #VALUE!. A column index that is too large is #REF!. Those were checked in earlier tests in the same workbook; they are not #NAME?.
Wrapping a #NAME? in IFERROR will replace it with whatever fallback you wrote, which can make a typo look like a missing value. IFNA does not catch #NAME?, which is what you want around a lookup. See IFERROR vs IFNA and the lookup errors guide.
Excel and Google Sheets differences
The error itself is the same. The catalog of legal names is not. Confirm the function exists in the product you are actually using, then confirm the version. Do not copy an Excel 365-only function into Sheets, or an Excel 365-only function into Excel 2019, and expect the typo checklist to save you. The name is spelled correctly and still fails.
Common mistakes
- Wrapping a new formula in IFERROR before it has returned a correct result once. A typo then looks like a blank or a “not found” label.
- Assuming
#NAME?on XLOOKUP means the lookup key is missing. Check whether XLOOKUP exists in that Excel version first. - Leaving quotes off a text constant, then creating a named range just to silence the error. Quote the text.
- Using European or translated function names in an English file, or the reverse, after a copy-paste from another locale.
FAQ
Is #NAME? the same as #N/A?
No. #N/A means a lookup (or a similar function) ran and did not find a match. #NAME? means the spreadsheet could not even resolve a function or identifier in the formula.
Why does XLOOKUP work in Google Sheets but show #NAME? in someone’s Excel file?
XLOOKUP ran in this Sheets file. Microsoft documents it for Excel 365 and Excel 2021, not for Excel 2016 or 2019. On those older Excel versions the function name itself can be the problem.
Why did TEXTBEFORE return #NAME? in Google Sheets?
In this file, TEXTBEFORE, TEXTAFTER and TEXTSPLIT all returned #NAME?. They are Excel 365 functions. For first and last names in Sheets, use FIND or SEARCH with LEFT and RIGHT, or SPLIT; see Split Full Names into First, Middle and Last Name.
Can IFNA hide a #NAME? typo?
No. IFNA only replaces #N/A. =IFEROR(1/0,0) in this test stayed #NAME? because the wrapper name itself was wrong. Once the spelling is fixed, IFERROR would hide other errors; use it with care.
I did not typo a function. What else should I check?
Unquoted text, a named range that was deleted or never defined, a function from the other spreadsheet product, and a locale-specific function name.
Related tutorials
- Excel & Google Sheets Lookup Errors: The Complete Troubleshooting Guide
- IFERROR vs IFNA: Which Should You Use for Lookups?
- #VALUE! Error in Excel and Google Sheets: Causes and Fixes
- Split Full Names into First, Middle and Last Name in Excel & Google Sheets
Live-test findings
All results above come from one Google Sheets file dated November 12, 2026. SUMM, XLLOOKUP, IFEROR, VPR, an unquoted hello, and MissingNamedRange each returned #NAME?. ="hello" returned hello, =SUM(1,2) returned 3, and XLOOKUP returned 12.5. TEXTBEFORE, TEXTAFTER and TEXTSPLIT returned #NAME? in this Sheets file.
Sources
- Microsoft Support: How to correct a #NAME? error: https://support.microsoft.com/en-us/office/how-to-correct-a-name-error-355d74e3-02ba-4179-a7f3-3c4658e95166
- Microsoft Support: XLOOKUP function (availability): https://support.microsoft.com/en-us/office/xlookup-function-b7fd680e-6d10-43e6-84f9-88eae8bf5929
- Microsoft Support: TEXTBEFORE function: https://support.microsoft.com/en-us/office/textbefore-function-d099c28a-dba8-448e-ac6c-f086d0fa1bd3
- Google Docs Editors Help: Error messages, #NAME?: https://support.google.com/docs/answer/3093317