How to Fix the #NAME? Error in Excel

#NAME? means Excel did not recognize a name in the formula. The most common cause is a misspelled function name. Type a few letters and pick the function from the AutoComplete list to avoid typos.

Formula to use

=SUM(A2:A9)

A wrong name like =SUMM(A2:A9) gives #NAME?

Text without double quotes

Text inside a formula must be wrapped in double quotes. Without them, Excel reads the word as a name and returns #NAME?.

  • =COUNTIF(A2:A9, "Seoul")Correct
  • =IF(B2>=60, "Pass", "Fail")Result text needs quotes too

A range missing its colon

A range like A2:A9 needs a colon (:) between the first and last cell. Written together as A2A9, it is read as a name and gives #NAME?.

  • =SUM(A2:A9)Not =SUM(A2A9): include the colon

A name that is not defined

To use a name as in =SUM(Sales), define it first in Formulas > Name Manager. If the spelling differs from the defined name, you get #NAME?. Picking it from Formulas > Use in Formula avoids spelling mistakes.

Functions that need an add-in

Some functions only work when an add-in is turned on. Microsoft documentation says a function that needs an add-in, such as EUROCONVERT, gives #NAME? when the add-in is off. Turn it on in File > Options > Add-ins.

Try the functions used here

Change the arguments in the function playground and watch the calculation step by step.

  • SUM functionAdds all the numbers. Text and blank cells are skipped.
  • COUNTIF functionCounts the cells in a range that meet a condition.
  • IF functionReturns one value if a condition is true and another value if it is false.
  • XLOOKUP functionFinds a value in one range and returns the value at the same position in another range. It can return values to the left, too.

FAQ

I get #NAME? when the file is opened on another computer.
The file may use a function that Excel on that computer does not have. For example, the supported versions for XLOOKUP and FILTER in Microsoft documentation start at Excel 2021. Check the other version, or switch to a function every version has, such as VLOOKUP.
Can I hide it with IFERROR?
Microsoft documentation advises against hiding #NAME? with IFERROR. The formula is not calculating properly, so its result cannot be trusted.

More guides