Excel #NAME? Error: Causes and Fixes

Errors & fixes · Updated November 3, 2026

Excel #NAME? Error: Causes and Fixes

You are getting Excel’s #NAME? error because Excel cannot recognize some text in a formula as a valid function, defined name, or other formula reference. Check the spelling of function and range names first, then look for text values that need quotation marks or names that have not been defined.

What the #NAME? error means

Excel reads a formula by identifying its functions, references, operators, and constants. When it encounters a word or name it cannot resolve, it may display #NAME? in the cell. The error is a clue that Excel does not understand part of the formula; it does not, by itself, tell you exactly which part is wrong.

This is different from a formula that Excel understands but cannot calculate as intended. For example, #DIV/0! points to division by zero, while #REF! indicates an invalid cell reference. With #NAME?, start by inspecting the formula text itself, especially anything that looks like a function name or a custom name.

The error can appear after you type a formula, paste one from a website, open a workbook created in another program, or use a function that is unavailable in your Excel version. A workbook may also show the error if it refers to a custom function supplied by an add-in that is not available on your computer.

Common causes to check first

Several small formula mistakes can produce the same error. Inspect the formula bar, rather than relying only on what is visible in the cell, and look for these common causes:

  • A misspelled function: A typo in a function name can make Excel treat it as an unknown name. Function names are not case-sensitive, so changing sum to SUM will not fix a spelling error.
  • Text without quotation marks: Excel needs text constants in formulas to be enclosed in straight double quotation marks. Without them, a word such as Yes may be interpreted as a defined name instead of text.
  • An undefined name: A formula may use a name such as TaxRate or SalesTotal that has not been created, was deleted, or is outside the scope where the formula can use it.
  • A misspelled named range: A defined name can exist but still be entered incorrectly in the formula. Check for missing letters, extra characters, or an unintended space.
  • An unsupported function: A function in a workbook may not be available in an older Excel release, or may depend on an add-in or custom function that is not installed or enabled.
  • A reference written as a name: A missing sheet-reference symbol, an incorrect sheet name, or an incorrectly written reference can lead Excel to interpret part of the expression as an unknown name.

Fix text constants and spelling mistakes

Text in a formula needs quotation marks when it is meant to be a literal value rather than a cell reference or defined name. For example, suppose A2 contains the word Yes. With A2 as the input cell, the formula =IF(A2=Yes,1,0) returns #NAME? if Excel cannot find a defined name called Yes. The corrected formula, =IF(A2="Yes",1,0), returns 1 when A2 contains Yes.

That example assumes the text in A2 is exactly Yes, with no extra spaces or different spelling. If the cell contains yes, the comparison still normally succeeds because Excel’s text comparisons are generally not case-sensitive. If it contains Yes with a trailing space, however, it may not match the literal text as expected. In that situation, inspect the cell contents or clean the source data rather than treating every mismatch as a name error.

For a function typo, compare the formula with Excel’s function suggestions or its Function Arguments dialog. As a worked example, assume B2:B6 contains 10, 20, 30, 40, and 50. The misspelled formula =SMU(B2:B6) returns #NAME?; the correctly spelled formula =SUM(B2:B6) returns 150. The values total 150, so if the corrected formula produces something else, check that the cells contain the expected numbers.

Do not assume every unfamiliar word needs quotation marks. A cell address, a defined name, or a function argument may correctly appear without quotes. The key question is whether that part of the formula is meant to be literal text or a reference Excel should resolve.

Check defined names and their scope

Defined names let a workbook use readable labels in place of cell references. A name such as TaxRate can refer to a cell or range, for example, but Excel must have that name registered before a formula can use it. If a formula refers to a name that does not exist, or spells it differently from the saved name, Excel may show #NAME?.

In Excel for Microsoft 365 on Windows, open Formulas > Name Manager to review workbook names. Look for the exact name used in the formula, its Refers to value, and its Scope. A name can apply to the entire workbook or only to a particular worksheet. A worksheet-scoped name may not be available from a formula on another sheet in the way you expect, especially if another name with the same label exists at workbook scope.

You can also create or edit names through Formulas > Define Name. Before changing one, check what it refers to: a name may intentionally point to a range, a constant, or a formula. Renaming it without updating dependent formulas can cause new errors. If a workbook came from someone else, ask what its names are intended to represent before deleting unfamiliar entries.

Names have rules. They cannot contain spaces, and a name cannot be written in a way Excel interprets as a cell reference. For a readable label with multiple words, use an allowed separator such as an underscore, or use a cell reference instead. Names can also be confused with text: a word used as a name is not automatically a text constant.

Look for sheet references and quoted text

When a formula refers to a worksheet whose name contains spaces or certain punctuation, the sheet name needs single quotation marks around it. For instance, a reference to cell A1 on a sheet called Sales Data is written with the sheet name enclosed in single quotes, followed by an exclamation mark and the cell reference. If the sheet name is misspelled or the reference is copied from a workbook with a different tab name, Excel may not resolve it correctly.

Single quotation marks around a sheet name and double quotation marks around text in a formula serve different purposes. A sheet name is part of a reference; a text value is a literal constant. Confusing those roles can make a formula invalid or lead Excel to look for a name that does not exist. When possible, start typing a reference and click the relevant sheet and cell so Excel inserts the reference using the proper format.

Also check whether the formula uses the intended punctuation. Excel’s list separator can vary with regional settings, so some installations use a semicolon where others use a comma between function arguments. A separator mismatch more commonly triggers a formula-entry or parsing problem, not necessarily #NAME?, but it is worth checking when you paste a formula written for another locale. Do not replace separators blindly; use the style accepted by your Excel installation.

Check function availability and add-ins

A formula copied from a newer workbook may use a function that an older Excel version does not support. Microsoft 365 and Excel 2021 include functions such as XLOOKUP, FILTER, and UNIQUE; older releases may not recognize them. Excel may display an unsupported-function indicator such as _xlfn. in a formula or show an error when it cannot calculate the function. Confirm the Excel version and the function’s availability before rewriting a formula.

Some functions are not built into Excel at all. A workbook might rely on a custom function written in VBA or supplied by an add-in. If the function is unavailable, the formula can no longer calculate as it did on its original computer. Check whether the workbook documentation identifies an add-in, whether the add-in is installed and enabled, and whether the file came from a trusted source. Do not enable macros or install an add-in merely because a workbook requests it; follow your organization’s security guidance.

Excel for the web and Excel for Mac can also differ from Excel for Microsoft 365 on Windows in available features and interface details. If a formula works on one device but not another, compare the Excel versions and whether the same add-ins or custom functions are available. A workbook’s formula may be correct for its original environment but not portable to every Excel installation.

A practical troubleshooting sequence

Work from the most visible issues to the less common ones. This sequence helps isolate the cause without changing unrelated formulas:

  1. Select the cell and read the full formula in the formula bar. Identify the first word, name, or reference that Excel might not recognize.
  2. Check function spelling and use Excel’s function autocomplete or the Insert Function option to confirm the function name.
  3. Put quotation marks around text constants, but do not add quotes around cell references or names that are meant to refer to workbook data.
  4. Open Formulas > Name Manager and verify that each custom name exists, is spelled correctly, and has an appropriate scope and Refers to value.
  5. Check sheet-tab names and references, especially if the formula was copied from another workbook or refers to a sheet name containing spaces.
  6. Confirm that your Excel version supports the function and that any required add-in or custom-function file is available.
  7. If the cause remains unclear, compare the formula with a working example and use Formulas > Evaluate Formula to inspect how Excel evaluates it step by step.

Change one suspected cause at a time, then check whether the error disappears and whether the result makes sense. A formula that stops showing #NAME? is not automatically correct: it may now calculate a result based on the wrong range, a misspelled text value, or a name pointing to unintended cells.

How #NAME? differs from other Excel errors

Recognizing the error type can prevent you from troubleshooting the wrong thing. #NAME? points toward an unrecognized name or formula text. #REF! means a reference is invalid, often because referenced cells or sheets were deleted or moved in a way that broke the formula. #VALUE! generally indicates an inappropriate value or data type for an operation, while #N/A often means a lookup did not find a match or that a value is unavailable.

These errors can be related. For example, fixing a misspelled function might reveal a separate problem in the function’s arguments. Likewise, a lookup formula can contain a valid function name but still return #N/A because it cannot find a match. Read the displayed error first, then inspect the relevant part of the formula rather than making broad changes to the workbook.

Frequently Asked Questions

Why does Excel say #NAME? when my formula looks correct?
Check for a name that is misspelled, undefined, or scoped to a different worksheet. Also verify that your Excel version supports the function and that the workbook’s required add-ins or custom functions are available.

Do I need quotation marks around words in Excel formulas?
Use straight double quotation marks when a word is literal text in the formula, such as a label being compared with a cell value. Do not add them to a function name, cell reference, or defined name that Excel is supposed to resolve.

Can a misspelled named range cause #NAME?
Yes. If a formula refers to a name that does not exist or does not match the saved name, Excel may return #NAME?. Check the spelling and scope in Formulas > Name Manager.

Why does a formula work on another computer but show #NAME? on mine?
The other computer may have a newer Excel version, a required add-in, or a custom function that is missing on yours. Compare versions and installed components, and check for an unsupported-function indicator in the formula.

Is #NAME? the same as #VALUE! or #REF!?
No. #NAME? means Excel cannot resolve part of the formula as written. #VALUE! points to a value or data-type issue, and #REF! indicates an invalid reference. The distinction helps narrow down what to inspect.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Errors & fixes

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.