The top reason why the #NAME? error appears in the formula is because there's a typo in the formula name. Look at the following example:
Important: The #NAME? error signifies that something needs to be corrected in the syntax, so when you see the error in your formula, resolve it. Do not use any error-handling functions such as IFERROR to mask the error.
To avoid typos in formula names, use the Formula Wizard in Excel. When you start typing a formula name in a cell or the Formula Bar, a list of formulas matching to the words you've entered displays in a dropdown. Once you enter the formula name and the opening parentheses, the Formula Wizard displays the syntax as hover text.
You can also use the Function Wizard to avoid the syntactical errors. Select the cell with the formula, and on the Formulas tab, press Insert Function.
Excel automatically loads the Wizard for you.
As you select each argument, Excel gives you the appropriate information for each one.
Below are other causes of the #NAME? error.
When your formula has a reference to a name not defined in Excel, you see the #NAME? error.
See the following example of a SUM function referring to Profit, which is an undefined name in the workbook.
Solution: Define a name in Name Manager, and then add the name to the formula by following these steps:
If you already have the data in the spreadsheet, and you want to assign a name to specific cells or a cell range, first select the cells in the spreadsheet. If you want to create a new range, you can skip this step.
Go to Formulas > Defined Names > select Define Name, and then select Define Name.
Enter a unique name.
For the Scope, select if you want the name to be available within the sheet only, or the entire workbook.
Enter an optional comment.
The next steps are to add the name in the formula.
Keep the cursor in the formula syntax at the point where you want to add the name you just created.
Go to Formulas > Defined Names > select Use in Formula, and then select the defined name you want to add.
For more information on using defined names, see Define and use names in formulas.
If the syntax incorrectly refers to a defined name, you see the #NAME? error.
Continuing with the previous example, a defined name for Profit was created in the spreadsheet. In the following example, the name is not spelled correctly, so the function still throws the #NAME? error.
Solution: Correct the typo in the syntax and retry the formula.
Tip: Instead of manually entering defined names in formulas, you can have Excel do it automatically for you. Go to Formulas > Defined Names > select Use in Formula, and then select the defined name you want to add. Excel adds the name to the formula.
When you include text references in formulas, you need to enclose the text in quotation marks, even if you’re only using a space. If the syntax omits double quotation marks “” for a text value, you see the #NAME error.
See the following example.
The syntax in this example is missing double quotation marks for has; that explains the error.
Solution: Go back to your syntax and manually inspect to make sure that any text values have quotation marks around them.
If you miss a colon in a range reference, the formula displays a #NAME? error.
In the following example, the INDEX formula throws the #NAME? error because the B2 to B12 range is missing a colon.
Solution: Check your syntax to make sure all range references include the colon.
There are some Excel functions that work only when certain add-ins are enabled. Using these functions otherwise produces a #NAME? error. For example, to use the EUROCONVERT function, the Euro Currency Tools add-in must be enabled. If you use custom functions or macros that require the Analysis ToolPak, make sure that the Analysis ToolPak add-in is enabled.
To enable add-ins in Excel:
Go to File > Options.
In the Manage list box, select Excel Add-ins, and then select Go.
Check the relevant box and select OK.