The name error in an Excel formula is #NAME?. It means Excel cannot identify text in the formula as a valid function, cell reference, defined name, or text value; check spelling, quotation marks, and named ranges first, then confirm that your Excel version supports the function.
What the #NAME? error means
Excel formulas can contain functions such as SUM, references such as A1, defined names such as AnnualSales, and text values. Excel has to interpret each part before it can calculate the formula. When it finds a word or other expression it cannot interpret, it returns #NAME? rather than a calculated value.
The error points to a problem with how part of the formula is written or defined, not necessarily to bad data in the cells it refers to. For example, a misspelled function name is different from a correctly written function that produces an error because its input is unsuitable. A #NAME? result often appears immediately after a formula is entered, but it can also appear when a workbook is opened in a different Excel version or after a name used by a formula has been removed.
It is also easy to confuse the error with a worksheet name or a label displayed beside a cell. The actual error value is #NAME?; text elsewhere in the workbook does not cause it unless the formula tries to use that text as an unquoted name.
Common causes and quick checks
Start by selecting the cell with the error and reading the formula in the formula bar. Look for a word Excel might not recognize. These are the usual causes:
- A function name is misspelled, such as typing SMU instead of SUM.
- Text is missing its double quotation marks, so Excel treats the word as a name.
- A formula uses a defined name that does not exist, was deleted, or is spelled differently.
- A function is unavailable in the Excel version being used.
- A name or function was copied with a typo, an unintended character, or punctuation that Excel does not recognize.
Check the formula one component at a time rather than changing several things at once. If the expression contains a function, compare its spelling with the function name shown in Excel’s formula suggestions or Insert Function dialog. If it contains a word that is meant to be ordinary text, check whether that word should be enclosed in double quotation marks. If it looks like a custom label, check the workbook’s defined names.
For example, with numbers 12, 18, and 20 in B2:B4, this mistyped formula returns #NAME? because SMU is not a recognized function:
With values 12, 18, and 20 in B2:B4, the mistyped formula =SMU(B2:B4) returns #NAME?.
With the same values in B2:B4, the corrected formula =SUM(B2:B4) returns 50, because 12 + 18 + 20 = 50.
Text values need quotation marks
Text written directly inside a formula must generally be enclosed in straight double quotation marks. Without them, Excel may interpret the word as a defined name. If that name has not been created, the formula can return #NAME?. This is a common issue in IF formulas that test a cell for a word such as Yes, Complete, or North.
With the word Yes in A2, the unquoted comparison below treats Yes as a name rather than as text:
With A2 containing the text Yes, =IF(A2=Yes,1,0) can return #NAME? because Yes is not quoted.
With the response in A2, the corrected formula =IF(A2="Yes",1,0) returns 1 when A2 contains Yes and 0 when it contains something else. The comparison is not case-sensitive in ordinary Excel text comparisons, so a value such as YES also matches. If the text is stored in another cell, compare with that cell reference instead of typing the word into the formula.
Use straight quotation marks, not typographic “curly” quotation marks copied from a formatted document or webpage. Excel formulas use the straight character shown here: ". Curly marks can prevent Excel from parsing a formula as intended. Also distinguish text from a cell reference: A2 means the contents of cell A2, while “A2” is the literal text A2.
Check function spelling and Excel version
Function names must be spelled correctly. A single transposed or missing letter can turn a valid function into an unknown name. Excel’s formula autocomplete can help: begin typing the function and select the intended suggestion, or use Formulas > Insert Function to search for a function and view its description.
Version compatibility matters too. A workbook may contain a function added after the recipient’s Excel release. Functions including XLOOKUP, XMATCH, FILTER, SORT, UNIQUE, SEQUENCE, and LET require Excel 2021 or Microsoft 365. Functions including LAMBDA, TEXTSPLIT, TEXTBEFORE, TEXTAFTER, VSTACK, and HSTACK require Microsoft 365 or Excel 2024. An older version may not recognize a function that works in a newer one; the exact displayed behavior can depend on the version and workbook.
If a function appears to be spelled correctly, check which Excel version is opening the file and whether that version supports the function. In Microsoft 365 for Windows, use File > Account to view product information and installed updates. If someone sends you a workbook, ask which Excel release they used, especially if the formula contains a recently added function. Replacing the function with an older alternative may be possible, but the right replacement depends on what the original formula is meant to do.
Find and repair a missing defined name
A defined name is a custom label that refers to a cell, range, constant, or formula. For instance, a workbook might use a name such as TaxRate or QuarterSales so formulas are easier to read. If a formula refers to a name that was never created, was renamed, or was deleted, Excel may show #NAME?. A name can also be misspelled in the formula even when a similar name exists.
In Excel for Microsoft 365 on Windows, open Formulas > Defined Names > Name Manager. Review the names in the list and compare their spelling with the formula. The Name Manager shows each name’s scope and the reference or value assigned to it. You can also use Ctrl+F3 on Windows to open Name Manager. On Mac, use Formulas > Define Name or the Name Manager command available on the Formulas tab; menu placement and keyboard shortcuts can vary by Excel for Mac release.
If the name should exist but is missing, create or correct it through Formulas > Defined Names > Define Name. Check its scope: a name can apply to the whole workbook or only to a particular worksheet. A worksheet-scoped name may not be available where you expect it, and a local name can take precedence over a workbook-level name with the same spelling. When a formula uses a name that is no longer wanted, replace the name with the correct cell or range reference, or restore the intended definition.
Names have restrictions. They cannot contain spaces, and a name cannot be written in a way Excel interprets as a cell reference, such as A1. Use a clear name beginning with a letter or underscore, and avoid punctuation that makes it difficult to read. Defined names are not case-sensitive, so Sales and SALES refer to the same name, but spelling still matters.
Other formula details that can cause confusion
Some formula problems resemble a name error but have a different cause. Excel uses commas between function arguments in many regional settings, but some installations use semicolons because of regional settings. If a formula copied from another computer is rejected, check the separator expected by your Excel installation. This is a parsing issue and may produce a message or another error rather than #NAME?; do not assume every rejected formula is a missing name.
Check for stray characters introduced by copying and pasting, including an apostrophe, an extra period, or nonstandard quotation marks. In a formula, text enclosed in quotes is interpreted as text; a word outside quotes is generally interpreted as a name or function. A worksheet tab name is not automatically a defined name. If you intend to refer to a cell on another sheet, use a proper sheet reference rather than typing the sheet label as if it were a function or name.
Also distinguish #NAME? from errors such as #REF!, which signals an invalid reference, and #VALUE!, which commonly indicates an unsuitable value or argument. The error code is a useful clue, but it does not identify the exact typo by itself. Read the full formula and verify each function, name, text value, and reference.
A step-by-step way to fix the error
- Select the cell displaying #NAME? and inspect its formula in the formula bar.
- Identify each word in the formula. Decide whether it is a function, a defined name, a cell reference, or literal text.
- Correct function spelling, and put straight double quotation marks around text values typed directly into the formula.
- Open Name Manager and confirm that every custom name exists, is spelled correctly, and has the intended scope and reference.
- Check whether your Excel version supports any newer functions used in the formula.
- Re-enter or edit the formula, then press Enter and check that the result is plausible for the referenced data.
If the formula is long, use the formula bar to inspect it in sections. You can temporarily select part of a formula in the formula bar and press F9 to evaluate that portion, but press Esc afterward to avoid replacing the formula with the evaluated value. Use this cautiously, and save a copy before making substantial changes. For a simpler diagnosis, rebuild the formula in stages, confirming that each function or name is recognized before adding the next part.
How to prevent #NAME? errors
Use Excel’s autocomplete and function descriptions when entering unfamiliar functions. Refer to cells instead of repeatedly typing text into formulas, and keep defined names in a consistent naming scheme. Names such as MonthlyRevenue are easier to audit than short labels whose purpose is unclear, while names should still be specific enough to avoid confusion.
When sharing a workbook, consider whether the recipient’s Excel version supports its functions. If a formula depends on custom names, leave those names in the workbook and avoid deleting them during cleanup. Keep formula cells separate from explanatory notes, and use cell references or data validation where appropriate so users do not have to type key text values manually.
Finally, review formulas after copying them between workbooks. A formula can rely on a defined name that exists in the original workbook but not the destination workbook. Copying the formula alone does not always copy every definition it needs. Name Manager is a useful final check whenever a formula appears correct but still returns #NAME?.
Frequently Asked Questions
What does #NAME? mean in Excel?
It means Excel cannot recognize part of a formula, often because a function is misspelled, text is not quoted, or a defined name is missing. It can also indicate that the current Excel version does not support a function in the workbook.
How do I fix #NAME? in an Excel formula?
Inspect the formula for misspelled function names, unquoted text, and names that are absent or incorrectly scoped in Formulas > Defined Names > Name Manager. Then check function availability in your Excel version.
Why does Excel show #NAME? for a word in my formula?
Excel may be treating the word as a defined name rather than ordinary text. Put the word in straight double quotation marks if it is a literal text value, or create the intended defined name if it is meant to represent a range or value.
Can an unsupported Excel function cause #NAME?
Yes. A workbook opened in an older release may use a function that release does not recognize. Check the function’s version requirements and open the file in a compatible release, or replace the function with an appropriate supported method.
Is #NAME? the same as #REF!?
No. #NAME? points to an unrecognized name or formula text. #REF! indicates a reference problem, such as a formula pointing to a cell or range that is no longer valid.
Related
- Excel Data Validation Shortcut: Windows and Mac
- Data Validation Plan in Excel: Build Reliable Checks
- Excel Data Validation: Select Multiple Items from a List
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- WORKDAY Formula Not Working? Fix Excel Date ErrorsIf Excel’s WORKDAY formula is returning an error or an unexpected date, check that the start date is…
- Excel Freezing? Fix a Workbook That Stops RespondingIf Excel is freezing, first wait briefly to see whether it is finishing a calculation or loading a…
- VLOOKUP #VALUE! Error: Causes and FixesA VLOOKUP formula returns #VALUE! most often when its column index argument is less than 1, or when…
- Excel Sheet Filter Not Working? Fix the Common CausesIf an Excel sheet filter is not working, first clear any existing criteria, then select the complete data…
- Why Is Flash Fill Not Working in Excel?Flash Fill usually fails because Excel cannot confidently detect a consistent pattern, the feature is turned off, or…
- Excel Filter Not Working in SharePoint? Causes and FixesIf a filter is not working in Excel in SharePoint, first check that the filter covers the full…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.