#NAME? Error in Excel – How to Fix!

When working with Excel formulas, you might come across the #NAME? Error.

Some common reasons for the #NAME? error include misspelled function names, incorrect use of text strings, or improperly defined named ranges.

By carefully reviewing your formula and making the necessary corrections, you can easily resolve this error and go back to working with your data in Excel.

In this article, we will show you some common reasons why the #Name Error occurs, as well as how to fix it.

Understanding #NAME Error

The #NAME error in Excel indicates that there is an issue with the syntax of your formula, often caused by a misspelled function or an incorrect argument.

When you come across the #NAME? error in Excel, it’s important to fix it instead of masking it with error-handling functions like IFERROR. This is because this is not an expected error (such as the DIV error or the REF error). This error is because of a mistake that needs to be corrected.

Below are some of the common reasons why you may see the #NAME error in your worksheet:

  • Misspelled function names
  • Incorrect cell references or ranges (or worksheet/workbook names)
  • Using a function that doesn’t exist in your version of Excel (or using the wrong name of a custom function you have created using VBA)
  • Text strings that are not enclosed in double quotation marks

For example, if you’re trying to use the VLOOKUP function but accidentally type “VLOKUP” instead, Excel will return the #NAME error because it doesn’t recognize the function.

Another example is when you use a function like LEN and forget to enclose a text string in double quotation marks, like =LEN(Apple).

In this case, Excel won’t know that you want to refer to the text string “Apple” and will return the #NAME error.

Also read: #VALUE! Error in Excel – How to Fix!

Common Causes of #NAME Error in Excel

Now let’s look at some of the common causes of the NAME error in Excel and how to correct it.

Misspelled Function Names

When entering Excel functions, we have to use the correct spelling of the function name. If we make a typo, we will get a #Name Error.

Sales for three months are shown in the table below. Cell E2 calculates the total sales. But that cell has a #Name Error in it.

Incorrect name of the function leading to NUM error

If we look at the formula bar, we can see that the function name has a misspelling. The “SUM” function is misspelled as “summ.”

Hence, if we get a #Name Error, we can double-check that we entered the function name accurately.

The following steps can help us avoid making this type of error.

Using IntelliSense to choose the function name

As we start typing the function name, double-click the function name from the Excel functions suggestion list.

Use the IntelliSense list to select function name

Use the Excel Formula Wizard

Alternatively, you can choose the cell into which you wish to enter the function. In this example, it is cell E2. Then, on the “Formula” tab, choose “Insert Function”.

click on the Insert Function Option

When we click the Insert Function button, a dialog box will appear. After that, we can use the dialog box to search for and choose the function name.

Search function name that you want to use
Also read: #NUM! Error in Excel – How to Fix it?

Misspelled Function Arguments

Name errors can also occur when you have misspelled argument names in the functions.

In the following example, the VLOOKUP function is used in cell E2 to get the age of the selected person in cell D2.

But Excel gives a #Name error.

name error because of misspelled argument in VLOOKUP function

The final argument’s misspelling is the reason for the above problem. “False” should be the final argument. However, the final “e” was missed when typing.

This can be a common issue, so Excel has this inbuilt functionality that displays a selection of options to pick from when we need to enter something other than a cell or range for an argument.

true and false values are shown as a drop down within the formula

We can double-click and select the option. Typos can happen when typing by hand.

Also read: SPILL Error in Excel – How to Fix?

Using Undefined Names

The use of undefined names in Excel calculations is another very common source of #Name errors.

The table below shows a student’s scores for three subjects. Cell E2 computes the average score of the three subjects. But, there is a #Name error.

name error because the name has not been defined

In the above scenario, “Scores” is not a defined name in that Excel workbook. Therefore, Excel returns a #Name error.

To overcome this error, we have to follow the below steps.

  1. Select the cell or the range to define a name.
  2. Go to the “Formulas’ tab.
  3. Click “Define Name” in the “Defined Names” group.
click on the define name option in the ribbon
  1. Enter a name in the “Name” box and click “Ok”.
enter the name and the range it refers to

When we click the “OK” button, we will get the average score in cell E2.

once you have defined the name, it should work in formulas

Spelling Errors When Using Defined Names

Let’s say that we have a defined name as “Scores” in our Excel workbook.

In the table below, we used the defined name to calculate a student’s average score. Cell E2, however, contains a #Name error.

incorrect defined name leads to name error

If we carefully check the name used in the formula, we can see that it does not match the defined name. The formula uses “Score,” but the defined name is “Scores.”

To resolve this issue, we have to match the name entered in the formula to the defined name. In this case, we can correct the name by adding the letter “s” to the end.

Correcting the name in the function will remove the name error and give us the reesult.

Excel will suggest matching defined names in the worksheet as we begin typing the defined name inside the formula. We can just double-click to choose the defined name. This method helps eliminate misspelled defined names in our formulas.

Using Name Range with Local Scope

As we define name ranges, we have to select the scope of the name we are defining.

specify the scope of that defined name

We can pick “Workbook” (Global scope) or one of the workbook’s sheet names (Local scope) as the scope of the name that we are defining.

A #Name error will be shown by Excel if we try to use a defined name with a local scope in a different worksheet. We cannot change the scope after we have defined the name. So, when defining the name, it is important to choose the scope carefully.

Missing Double Quotation for Text Values

If we want to enter a text value into an Excel formula, we have to enter it inside the double quotation marks.

The invoice numbers of a company are shown in Column A of the table below. Each invoice number has been prefixed with the initials “INV” in column B.  Unfortunately, Excel is not giving the expected result, and there is a #Name error.

double quotation is missing in the text in the formula

In this case, the #Name issue happens because the text value – INV is not enclosed by double quotation marks.

Adding double quotation marks before and after the text value will fix the above problem. We can then get the expected outcome.

adding the double quotes would remove the name error and give us the result

Missing Colon in Range Reference

When entering a range reference, a colon separates the first and last cell of the range. The missing colon in a range reference results in a #Name error.

The net profit for four quarters of a business is shown in the table below. The total net profit is calculated in Cell F2. However, the result is a #Name error.

missing colon between cell references can also lead to name error

The #Name error occurred in the above formula because we failed to include a colon between two cell references in the range reference.

This problem is pretty simple to solve. Simply place a colon between the two cell references.

Then we can fix the #Name error.

making sure that the references are correct would remove the name error

Incomplete Cell References

When entering a range reference, make sure that the cell reference format of the top left cell and the lower right cell match.

For example, if we entered the cell reference of the top left cell as a combination of the column letter and row number (e.g., B2), the cell reference of the bottom right cell should also be a combination of the column letter and row number (e.g., D3).

The table below shows a company’s net profit for four quarters. Cell F2 is used to calculate the total net profit of the cell range, beginning with cell B2 and ending with cell E2. But there is a #Name error.

Incorrect references missing the row number or the column letter would lead to name error

We can see that the range reference’s end cell’s reference format does not match the first cell’s reference format when we check the formula bar. The row number is not entered in the range reference’s last cell reference.

The solution is to match the format of the range reference’s two cell references. So, in this case, we can enter row number (2) for the range reference’s last cell reference.

the name error is removed when you use the right cell references

Opening New Excel Functions in Older Versions of Excel

New functions are occasionally added to Microsoft Excel. Some of the new functions are not compatible with previous versions of Excel.

For example, new functions such as TOCOL, VSTACK, TEXTBEFORE, and TEXTSPLIT are only available and supported in Microsoft 365.

If we open an Excel file containing the above functions in a version of Excel other than Microsoft 365, we will see the #Name error for all cells that use such functions.

If we are sending an Excel file to someone who is using an older version of Excel, we can check and ensure that unsupported functions are replaced with compatible functions.

For example, instead of TEXTBEFORE, consider using the LEFT function.

Use of Functions That Needs to Enable Specific Add-In

Some Excel functions are only available if we enable a specific Add-In.

For example, the EUROCONVERT function, which is used to convert Euros to a Euro member currency and vice versa, is only available if the Euro Currency Add-In is enabled.

Otherwise, Excel will display the #Name problem.

To enable Euro-Currency Add-In, we have to follow the below steps.

  1. Go to the file tab and click options.
  2. Select Add-ins from the Excel options dialog box.
  3. Choose the Excel Add-ins option from the “Manage” dropdown menu and then click on the “Go” button.
  4. Select “Euro Currency Tools” and click “Ok”.

Preventing #NAME Error in the Future

Now that you’re familiar with fixing the #NAME error, it’s essential to learn some strategies to prevent it in the future.

In this section, let’s explore how to make your Excel experience smoother by preempting the occurrence of the NAME error.

Using Excel’s Formula Autocomplete

When typing a formula, Excel offers formula autocomplete suggestions to help you out.

This helpful feature ensures that you always use the correct function names and reduces the risk of encountering the #NAME error.

Remember to choose the right suggestion to avoid misspelled function names.

Establishing Naming Conventions

Adopting clear and consistent naming conventions for your ranges and tables can make your Excel work more efficient.

Here are some tips for establishing useful naming conventions:

  • Use descriptive names to help identify the purpose easily.
  • Stay consistent with capitalization and prefixes or suffixes.
  • Avoid spaces and special characters in names.

With a structured approach to naming, you can quickly reference ranges and tables in your formulas, minimizing the risk of #NAME errors.

Organizing Add-ins

Ensure you properly set up and organize your add-ins to avoid issues with custom functions. Take a proactive approach by:

  • Regularly updating your add-ins.
  • Enabling the add-ins you need in Excel.
  • Verifying that the function names are correct and unique.

Remember these tips as you work in Excel, and you’ll reduce the likelihood of encountering the #NAME error in the future.

We have discussed a wide range of potential causes for the #Name error problem in Excel in this article. In order to get around the #Name error, you can follow the techniques provided for each cause.

Checking the Variable and Function Names in VBA

If you create user-defined functions using VBA, there is a possibility that you may get the name error when you try to use that function in your worksheet.

In most likelihood, the reason would be a misspelled function name or variable name in the VBA code that is used to create a custom function. Double-checking all the variable and function names and the syntax in the VBA code should take care of this issue.

Other Excel articles you may also like:

I am a huge fan of Microsoft Excel and love sharing my knowledge through articles and tutorials. I work as a business analyst and use Microsoft Excel extensively in my daily tasks. My aim is to help you unleash the full potential of Excel and become a data-slaying wizard yourself.

Leave a Comment