Formula errors in excel

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less

Formulas can sometimes result in error values in addition to returning unintended results. The following are some tools that you can use to find and investigate the causes of these errors and determine solutions.

Note: This topic contains techniques that can help you correct formula errors. It is not an exhaustive list of methods for correcting every possible formula error. For help on specific errors, you can search for questions like yours in the Excel Community Forum, or post one of your own.

Link to the Excel Community Forum

Learn how to enter a simple formula

Formulas are equations that perform calculations on values in your worksheet. A formula starts with an equal sign (=). For example, the following formula adds 3 to 1.

=3+1

A formula can also contain any or all of the following: functions, references, operators, and constants.

Parts of a formula

Parts of a formula

  1. Functions: included with Excel, functions are engineered formulas that carry out specific calculations. For example, the PI() function returns the value of pi: 3.142…

  2. References: refer to individual cells or ranges of cells. A2 returns the value in cell A2.

  3. Constants: numbers or text values entered directly into a formula, such as 2.

  4. Operators: The ^ (caret) operator raises a number to a power, and the * (asterisk) operator multiplies. Use + and – add and subtract values, and / to divide.

    Note: Some functions require what are referred to as arguments. Arguments are the values that certain functions use to perform their calculations. When required, arguments are placed between the function’s parentheses (). The PI function does not require any arguments, which is why it’s blank. Some functions require one or more arguments, and can leave room for additional arguments. You need to use a comma to separate arguments, or a semi-colon (;) depending on your location settings.

The SUM function for example, requires only one argument, but can accommodate 255 total arguments.

SUM function

=SUM(A1:A10) is an example of a single argument.

=SUM(A1:A10, C1:C10) is an example of multiple arguments.

The following table summarizes some of the most common errors that a user can make when entering a formula, and explains how to correct them.

Make sure that you

More information

Start every function with the equal sign (=)

If you omit the equal sign, what you type may be displayed as text or as a date. For example, if you type SUM(A1:A10), Excel displays the text string SUM(A1:A10) and does not perform the calculation. If you type 11/2, Excel displays the date 2-Nov (assuming the cell format is General) instead of dividing 11 by 2.

Match all open and closing parentheses

Make sure that all parentheses are part of a matching pair (opening and closing). When you use a function in a formula, it is important for each parenthesis to be in its correct position for the function to work correctly. For example, the formula =IF(B5<0),»Not valid»,B5*1.05) will not work because there are two closing parentheses and only one open parenthesis, when there should only be one each. The formula should look like this: =IF(B5<0,»Not valid»,B5*1.05).

Use a colon to indicate a range

When you refer to a range of cells, use a colon (:) to separate the reference to the first cell in the range and the reference to the last cell in the range. For example, =SUM(A1:A5), not =SUM(A1 A5), which would return a #NULL! Error.

Enter all required arguments

Some functions have required arguments. Also, make sure that you have not entered too many arguments.

Enter the correct type of arguments

Some functions, such as SUM, require numerical arguments. Other functions, such as REPLACE, require a text value for at least one of their arguments. If you use the wrong type of data as an argument, Excel may return unexpected results or display an error.

Nest no more than 64 functions

You can enter, or nest, no more than 64 levels of functions within a function.

Enclose other sheet names in single quotation marks

If a formula refers to values or cells on other worksheets or workbooks, and the name of the other workbook or worksheet contains spaces or non-alphabetical characters, you must enclose its name within single quotation marks ( ‘ ), like =’Quarterly Data’!D3, or =‘123’!A1.

Place an exclamation point (!) after a worksheet name when you refer to it in a formula

For example, to return the value from cell D3 in a worksheet named Quarterly Data in the same workbook, use this formula: =’Quarterly Data’!D3.

Include the path to external workbooks

Make sure that each external reference contains a workbook name and the path to the workbook.

A reference to a workbook includes the name of the workbook and must be enclosed in brackets ([Workbookname.xlsx]). The reference must also contain the name of the worksheet in the workbook.

If the workbook that you want to refer to is not open in Excel, you can still include a reference to it in a formula. You provide the full path to the file, such as in the following example: =ROWS(‘C:My Documents[Q2 Operations.xlsx]Sales’!A1:A8). This formula returns the number of rows in the range that includes cells A1 through A8 in the other workbook (8).

Note: If the full path contains space characters, as does the preceding example, you must enclose the path in single quotation marks (at the beginning of the path and after the name of the worksheet, before the exclamation point).

Enter numbers without formatting

Do not format numbers when you enter them in formulas. For example, if the value that you want to enter is $1,000, enter 1000 in the formula. If you enter a comma as part of a number, Excel treats it as a separator character. If you want numbers displayed so that they show thousands or millions separators, or currency symbols, format the cells after you enter the numbers.

For example, if you want to add 3100 to the value in cell A3, and you enter the formula =SUM(3,100,A3), Excel adds the numbers 3 and 100 and then adds that total to the value from A3, instead of adding 3100 to A3 which would be =SUM(3100,A3). Or, if you enter the formula =ABS(-2,134), Excel displays an error because the ABS function accepts only one argument: =ABS(-2134).

You can implement certain rules to check for errors in formulas. These rules do not guarantee that your worksheet is error free, but they can go a long way toward finding common mistakes. You can turn any of these rules on or off individually.

Errors can be marked and corrected in two ways: one error at a time (like a spell checker), or immediately when they occur on the worksheet as you enter data.

You can resolve an error by using the options that Excel displays, or you can ignore the error by clicking Ignore Error. If you ignore an error in a particular cell, the error in that cell does not appear in further error checks. However, you can reset all previously ignored errors so that they appear again.

  1. For Excel on Windows, Click File > Options > Formulas, or
    for Excel on Mac, click the Excel menu > Preferences > Error Checking

    In Excel 2007, click the Microsoft Office button Office button image> Excel Options > Formulas.

  2. Under Error Checking, check Enable background error checking. Any error that is found, will be marked with a triangle in the top-left corner of the cell.

    Cell with a formula error

  3. To change the color of the triangle that marks where an error occurs, in the Indicate errors using this color box, select the color that you want.

  4. Under Excel checking rules, select or clear the check boxes of any of the following rules:

    • Cells containing formulas that result in an error: A formula does not use the expected syntax, arguments, or data types. Error values include #DIV/0!, #N/A, #NAME?, #NULL!, #NUM!, #REF!, and #VALUE!. Each of these error values have different causes and are resolved in different ways.

      Note: If you enter an error value directly in a cell, it is stored as that error value but is not marked as an error. However, if a formula in another cell refers to that cell, the formula returns the error value from that cell.

    • Inconsistent calculated column formula in tables: A calculated column can include individual formulas that are different from the master column formula, which creates an exception. Calculated column exceptions are created when you do any of the following:

      • Type data other than a formula in a calculated column cell.

      • Type a formula in a calculated column cell, and then use Ctrl +Z or click Undo Undo button on the Quick Access Toolbar.

      • Type a new formula in a calculated column that already contains one or more exceptions.

      • Copy data into the calculated column that does not match the calculated column formula. If the copied data contains a formula, this formula overwrites the data in the calculated column.

      • Move or delete a cell on another worksheet area that is referenced by one of the rows in a calculated column.

    • Cells containing years represented as 2 digits: The cell contains a text date that can be misinterpreted as the wrong century when it is used in formulas. For example, the date in the formula =YEAR(«1/1/31») could be 1931 or 2031. Use this rule to check for ambiguous text dates.

    • Numbers formatted as text or preceded by an apostrophe: The cell contains numbers stored as text. This typically occurs when data is imported from other sources. Numbers that are stored as text can cause unexpected sorting results, so it is best to convert them to numbers. ‘=SUM(A1:A10) is seen as text.

    • Formulas inconsistent with other formulas in the region: The formula does not match the pattern of other formulas near it. In many cases, formulas that are adjacent to other formulas differ only in the references used. In the following example of four adjacent formulas, Excel displays an error next to the formula =SUM(A10:C10) in cell D4 because the adjacent formulas increment by one row, and that one increments by 8 rows — Excel expects the formula =SUM(A4:C4).

      Excel displays an error when a formula does not match the pattern of adjacent formulas

      If the references that are used in a formula are not consistent with those in the adjacent formulas, Excel displays an error.

    • Formulas which omit cells in a region: A formula may not automatically include references to data that you insert between the original range of data and the cell that contains the formula. This rule compares the reference in a formula against the actual range of cells that is adjacent to the cell that contains the formula. If the adjacent cells contain additional values and are not blank, Excel displays an error next to the formula.

      For example, Excel inserts an error next to the formula =SUM(D2:D4) when this rule is applied, because cells D5, D6, and D7 are adjacent to the cells that are referenced in the formula and the cell that contains the formula (D8), and those cells contain data that should have been referenced in the formula.

      Excel displays an error when a formula skips cells in a range

    • Unlocked cells containing formulas: The formula is not locked for protection. By default, all cells on a worksheet are locked so they can’t be changed when the worksheet is protected. This can help avoid inadvertent mistakes like accidentally deleting or altering formulas. This error indicates that the cell has been set to be unlocked, but the sheet has not been protected. Check to make sure that you do not want the cell locked or not.

    • Formulas referring to empty cells: The formula contains a reference to an empty cell. This can cause unintended results, as shown in the following example.

      Suppose you want to calculate the average of the numbers in the following column of cells. If the third cell is blank, it is not included in the calculation and the result is 22.75. If the third cell contains 0, the result is 18.2.

      Excel displays an error when a formula refers to empty cells

    • Data entered in a table is invalid: There is a validation error in a table. Check the validation setting for the cell by going to the Data tab > Data Tools group > Data Validation.

  1. Select the worksheet you want to check for errors.

  2. If the worksheet is manually calculated, press F9 to recalculate.

    If the Error Checking dialog is not displayed, then click on the Formulas tab > Formula Auditing > Error Checking button.

  3. If you have previously ignored any errors, you can check for those errors again by doing the following: click File > Options > Formulas. For Excel on Mac, click the Excel menu > Preferences > Error Checking.

    In the Error Checking section, click Reset Ignored Errors > OK.

    Error Checking

    Note: Resetting ignored errors resets all errors in all sheets in the active workbook.

    Tip: It might help if you move the Error Checking dialog box just below the formula bar.

    Move the Error Checking box below the Formula Bar

  4. Click one of the action buttons in the right side of the dialog box. The available actions differ for each type of error.

  5. Click Next.

Note: If you click Ignore Error, the error is marked to be ignored for each consecutive check.

  1. Next to the cell, click the Error Checking button Error Checking icon that appears, and then click the option you want. The available commands differ for each type of error, and the first entry describes the error.

    If you click Ignore Error, the error is marked to be ignored for each consecutive check.

    Move the Error Checking box below the Formula Bar

If a formula cannot correctly evaluate a result, Excel displays an error value, such as #####, #DIV/0!, #N/A, #NAME?, #NULL!, #NUM!, #REF!, and #VALUE!. Each error type has different causes, and different solutions.

The following table contains links to articles that describe these errors in detail, and a brief description to get you started.

Topic

Description

Correct a #### error

Excel displays this error when a column is not wide enough to display all the characters in a cell, or a cell contains negative date or time values.

For example, a formula that subtracts a date in the future from a date in the past, such as =06/15/2008-07/01/2008, results in a negative date value.

Tip: Try to auto-fit the cell by double-clicking between the column headers. If ### is displayed because Excel can’t display all of the characters this will correct it.

# error

Correct a #DIV/0! error

Excel displays this error when a number is divided either by zero (0) or by a cell that contains no value.

Tip: Add an error handler like in the following example, which is =IF(C2,B2/C2,0)

Error handling function such as IF can be used to cover errors

Correct a #N/A error

Excel displays this error when a value is not available to a function or formula.

If you’re using a function like VLOOKUP, does what you’re trying to lookup have a match in the lookup range? Most often it doesn’t.

Try using IFERROR to suppress the #N/A. In this case you could use:

=IFERROR(VLOOKUP(D2,$D$6:$E$8,2,TRUE),0)

#N/A error

Correct a #NAME? error

This error is displayed when Excel does not recognize text in a formula. For example, a range name or the name of a function may be spelled incorrectly.

Note: If you’re using a function, make sure the function name is spelled correctly. In this case SUM is spelled incorrectly. Remove the “e” and Excel will correct it.

Excel displays #NAME? error when a function name has a typo

Correct a #NULL! error

Excel displays this error when you specify an intersection of two areas that do not intersect (cross). The intersection operator is a space character that separates references in a formula.

Note: Make sure your ranges are correctly separated — the areas C2:C3 and E4:E6 do not intersect, so entering the formula =SUM(C2:C3 E4:E6) returns the #NULL! error. Putting a comma between the C and E ranges will correct it =SUM(C2:C3,E4:E6)

#NULL! error

Correct a #NUM! error

Excel displays this error when a formula or function contains invalid numeric values.

Are you using a function that iterates, such as IRR or RATE? If so, the #NUM! error is probably because the function can’t find a result. Refer to the help topic for resolution steps.

Correct a #REF! error

Excel displays this error when a cell reference is not valid. For example, you may have deleted cells that were referred to by other formulas, or you may have pasted cells that you moved on top of cells that were referred to by other formulas.

Did you accidentally delete a row or column? We deleted column B in this formula, =SUM(A2,B2,C2), and look what happened.

Either use Undo (Ctrl+Z) to undo the deletion, rebuild the formula, or use a continuous range reference like this: =SUM(A2:C2), which would have automatically updated when column B was deleted.

Excel displays the #REF! error when a cell reference is not valid

Correct a #VALUE! error

Excel can display this error if your formula includes cells that contain different data types.

Are you using Math operators (+, -, *, /, ^) with different data types? If so, try using a function instead. In this case =SUM(F2:F5) would correct the problem.

#VALUE! error

When cells are not visible on a worksheet, you can watch those cells and their formulas in the Watch Window toolbar. The Watch Window makes it convenient to inspect, audit, or confirm formula calculations and results in large worksheets. By using the Watch Window, you don’t need to repeatedly scroll or go to different parts of your worksheet.

Watch Window enables to easily monitor formulas used in a worksheet

This toolbar can be moved or docked like any other toolbar. For example, you can dock it on the bottom of the window. The toolbar keeps track of the following cell properties: 1) Workbook, 2) Sheet, 3) Name (if the cell has a corresponding Named Range), 4) Cell address, 5) Value, and 6) Formula.

Note: You can have only one watch per cell.

Add cells to the Watch Window

  1. Select the cells that you want to watch.

    To select all cells on a worksheet with formulas, on the Home tab, in the Editing group, click Find & Select (or you can use Ctrl+G, or Control+G on the Mac)> Go To Special > Formulas.

    Go To Special dialog box

  2. On the Formulas tab, in the Formula Auditing group, click Watch Window.

  3. Click Add Watch.

    Click Add Watch to add a watch in your spreadsheet

  4. Confirm that you have selected all of the cells you want to watch and click Add.

    In Add Watch, enter the cell range to watch

  5. To change the width of a Watch Window column, drag the boundary on the right side of the column heading.

  6. To display the cell that an entry in Watch Window toolbar refers to, double-click the entry.

    Note: Cells that have external references to other workbooks are displayed in the Watch Window toolbar only when the other workbooks are open.

Remove cells from the Watch Window

  1. If the Watch Window toolbar is not displayed, on the Formulas tab, in the Formula Auditing group, click Watch Window.

  2. Select the cells that you want to remove.

    To select multiple cells, press CTRL and then click the cells.

  3. Click Delete Watch.

    Delete Watch

Sometimes, understanding how a nested formula calculates the final result is difficult because there are several intermediate calculations and logical tests. However, by using the Evaluate Formula dialog box, you can see the different parts of a nested formula evaluated in the order the formula is calculated. For example, the formula =IF(AVERAGE(D2:D5)>50,SUM(E2:E5),0)is easier to understand when you can see the following intermediate results:

Evaluate Formula helps you to see how different parts of a nested formula are evaluated

In the Evaluate Formula dialog box

Description

=IF(AVERAGE(D2:D5)>50,SUM(E2:E5),0)

The nested formula is initially displayed. The AVERAGE function and the SUM function are nested within the IF function.

The cell range D2:D5 contains the values 55, 35, 45, and 25, and so the result of the AVERAGE(D2:D5) function is 40.

=IF(40>50,SUM(E2:E5),0)

The cell range D2:D5 contains the values 55, 35, 45, and 25, and so the result of the AVERAGE(D2:D5) function is 40.

=IF(False,SUM(E2:E5),0)

Because 40 is not greater than 50, the expression in the first argument of the IF function (the logical_test argument) is False.

The IF function returns the value of the third argument (the value_if_false argument). The SUM function is not evaluated because it is the second argument to the IF function (value_if_true argument), and it is returned only when the expression is True.

  1. Select the cell that you want to evaluate. Only one cell can be evaluated at a time.

  2. Select the Formulas tab > Formula Auditing > Evaluate Formula.

  3. Click Evaluate to examine the value of the underlined reference. The result of the evaluation is shown in italics.

    If the underlined part of the formula is a reference to another formula, click Step In to display the other formula in the Evaluation box. Click Step Out to go back to the previous cell and formula.

    The Step In button is not available for a reference the second time the reference appears in the formula, or if the formula refers to a cell in a separate workbook.

  4. Continue clicking Evaluate until each part of the formula has been evaluated.

  5. To see the evaluation again, click Restart.

  6. To end the evaluation, click Close.

Notes: 

  • Some parts of formulas that use the IF and CHOOSE functions are not evaluated — in these cases, #N/A is displayed in the Evaluation box.

  • If a reference is blank, a zero value (0) is displayed in the Evaluation box.

  • The following functions are recalculated each time the worksheet changes, and can cause the Evaluate Formula dialog box to give results different from what appears in the cell: RAND, AREAS, INDEX, OFFSET, CELL, INDIRECT, ROWS, COLUMNS, NOW, TODAY, RANDBETWEEN.

Need more help?

Connect with an expert. Learn from live instructors.

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Display the relationships between formulas and cells

How to avoid broken formulas

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Top 8 Most Common Excel Formula Errors

Below is the list of some most common errors that we can find in the Excel formula:

  1. #NAME? Error: This Excel error usually occurs because of the non-existent function.
  2. #DIV/0! Error: This Excel error because if we try to divide the number by zero or vice-versa.
  3. #REF! Error: This error arises due to a reference missing.
  4. #NULL! Error: This error comes due to unnecessary spaces inside the function.
  5. #N/A Error: The function cannot find the required data. Maybe the wrong reference is given.
  6. ###### Error: This is not a true Excel formula error, but it occurs because of a formatting issue. Probably, the value in the cell is more than the column width.
  7. #VALUE! Error: This is one of the common Excel formula errors we see in Excel. It occurs due to the wrong data type of the parameter given to the function.
  8. #NUM! Error: This Excel formula error because the number we have supplied to the formula is not proper.

Now, we will discuss them one by one in detail.

Table of contents
  • Top 8 Most Common Excel Formula Errors
    • #1 #NAME? Error
      • How to Fix the #Name? ERROR Issue?
    • #2 #DIV/0! Error
      • How to Fix the #DIV/o! ERROR Issue?
    • #3 #REF! Error
      • How to Fix the #REF! ERROR Issue?
    • #4 #NULL! Error
      • How to Fix the #NULL! ERROR Issue?
    • #5 #VALUE! Error
      • How to Fix the #VALUE! ERROR Issue?
    • #6 ###### Error
      • How to Fix the ###### ERROR Issue?
    • #7 #N/A! Error
      • How to Fix the #N/A! ERROR Issue?
    • #8 #NUM! Error
      • How to Fix the #NUM! ERROR Issue?
    • Things to Remember
    • Recommended Articles

#1 #NAME? Error

The #NAME? Excel formula error is when Excel cannot find the supplied function or the parameters we gave do not match the standards of the function.

You can download this Excel Errors (Excel Template) here – Excel Errors (Excel Template)

Just because of the display value of #NAME? It does not mean Excel is asking your name. Rather, it is due to the wrong data type for the parameter.

Name Error 1

If we notice in the formula bar, instead of the SUM formula in excelThe SUM function in excel adds the numerical values in a range of cells. Being categorized under the Math and Trigonometry function, it is entered by typing “=SUM” followed by the values to be summed. The values supplied to the function can be numbers, cell references or ranges.read more, we have misspelled the formula as su. So the result of this function is #NAME?.

How to Fix the #Name? ERROR Issue?

To fix the Excel formula error, we must look for the formula bar and check if the formula we have inserted is valid. If the formula spelling is inaccurate, we must change that to the correct wording.

Name Error 1-1

#2 #DIV/0! Error

The #DIV/0! Error is due to the wrong calculation method, or one of the operators is missing. This error occurs in calculations. For example, if we have a “Budgeted” number in cell A1 and the “Actual” number in cell B1, we must divide the B1 cell by the A1 cell to calculate the efficiency. If any cells are empty or zero, we may get this error.

DIV Error

How to Fix the #DIV/o! ERROR Issue?

To fix this Excel formula error, we must use one formula to calculate the efficiency level. Therefore, we can use the IFERROR function in excelThe IFERROR function in Excel checks a formula (or a cell) for errors and returns a specified value in place of the error.read more and calculate inside the function.

DIV Error in Excel 1

#3 #REF! Error

The #REF! Error is due to the supply of the reference missing suddenly. Look at the below example in cell B2. We have applied the formula “A2 + C2.”

REF Error 3

Now, we will delete column C2 and see the result in cell B2.

REF Error 3-1

Now, we will demonstrate one more example. Look at the below image. We have applied the VLOOKUP formula to fetch the dataThe VLOOKUP excel function searches for a particular value and returns a corresponding match based on a unique identifier. A unique identifier is uniquely associated with all the records of the database. For instance, employee ID, student roll number, customer contact number, seller email address, etc., are unique identifiers.
read more
from the primary data.

REF Error 3-2

In the VLOOKUP range, we have mentioned the data range as A:B. But in the column index number, we have mentioned the number as 3 instead of 2. So, as a result, the formula encountered an error because there is no column range 3 in the data range.

How to Fix the #REF! ERROR Issue?

Before adding or deleting anything to the existing data set, we must ensure all the formulas are pasted as values. If the deleting cell is referred to any of the cells, we may encounter this error.

We must always undo the action if we accidentally delete any rows, columns, or cells.

#4 #NULL! Error

The #NULL! Error is due to the wrong value supplied to the required parameters; for example, after the improper supply of range operator, incorrect mention of parameter separator.

Look at the below image. We have applied the SUM formula to calculate the sum of the values in cells A2 and B2. The mistake we made here is after the first argument. We should give a comma (,) to separate the two arguments. Instead, we have provided space.

Null Error 4

How to Fix the #NULL! ERROR Issue?

In these cases, we need to mention the exact argument separators. For example, we should use the comma (,) after the first argument in the above image.

Null Error 4-1

In the case of a range, we need to use a colon (:).

Null Error 4-2

#5 #VALUE! Error

The #VALUE! error occurs if the formula cannot find the specified result. It is due to non-numerical values or wrong data types to the argument.

Look at the image below. We have calculated the commission amount based on the sales value and commissions.

VALUE Error 5

If we notice the cells D6 and D8, we get an error as #VALUE!. The reason we got #VALUE! Error because there is no commission percentage in the cells C6 and C8.

We cannot multiply the text value with numerical values.

How to Fix the #VALUE! ERROR Issue?

In these cases, we must replace all the text values with zero until we get further information.

#6 ###### Error

The ###### error, is not an error. Rather, it is just a formatting issue. For example, look at the below image in cell A1 that has entered the date values.

#### Error 6

It is due to the length issue of the characters. The values in the cell are more than the column width. In simple terms, the column width is not wide enough.

How to Fix the ###### ERROR Issue?

We must double-click on the column to adjust the column widthA user can set the width of a column in an excel worksheet between 0 and 255, where one character width equals one unit. The column width for a new excel sheet is 8.43 characters, which is equal to 64 pixels.read more to get the full values visible.

#### Error 6-1

#7 #N/A! Error

The #N/A! error is because the formula cannot find the value in the data. It usually occurs in the VLOOKUP formulaThe VLOOKUP excel function searches for a particular value and returns a corresponding match based on a unique identifier. A unique identifier is uniquely associated with all the records of the database. For instance, employee ID, student roll number, customer contact number, seller email address, etc., are unique identifiers.
read more
(We know you have already encountered this error).

NA Error in excel 7

We got some errors as #N/A in the cells E6, E8, and E9. If we look at the ranges for these cells, it does not include the values against those IDs.

NA Error in excel 7-1

ID 156 is not in the range from A6 to B13; we got an error. Similarly, for the remaining two cells, we have the same issue.

How to Fix the #N/A! ERROR Issue?

We need to make this an absolute referenceAbsolute reference in excel is a type of cell reference in which the cells being referred to do not change, as they did in relative reference. By pressing f4, we can create a formula for absolute referencing.read more when referencing a table range.

NA Error in excel 7-2

We must press the F4 key to make it an absolute reference.

#8 #NUM! Error

The #NUM! Error is due to the formatting of the numerical values. If the numerical values are not formatted, we may get these errors.

How to Fix the #NUM! ERROR Issue?

We need to fix the formatting issue of the specific numbers.

Things to Remember

  • We must use the IFERROR function to encounter any Errors in ExcelErrors in excel are common and often occur at times of applying formulas. The list of nine most common excel errors are — #DIV/0, #N/A, #NAME?, #NULL!, #NUM!, #REF!, #VALUE!, #####, Circular Reference.read more
  • We can use the ERROR.TYPE formula to find the type error.
  • The #REF! Error is not good because we may not know which cell we refer to.

Recommended Articles

This article is a guide to Errors in Excel. We discuss the top 8 types of formula errors in Excel and how to fix these errors, along with Excel examples and downloadable Excel templates. You may also look at these useful functions in Excel: –

  • Errors in Excel
  • VBA Error Handling
  • What is Tracking Error Formula?
  • Percent Error Formula

The more formulas you write, the more errors you’ll run into :)

Although frustrating, formula errors are useful, because they tell you clearly that something is wrong. This is much better than not knowing.  The most disastrous Excel mistakes usually come from normal-looking formulas that quietly return incorrect results.

When you run into a formula error, don’t panic. Stay calm and methodically investigate until you find the cause. Ask yourself, «What is this error telling me?» Experiment with trial and error. As you gain more experience, you’ll be able to avoid many errors, and more quickly correct errors that do arise.

#DIV/0!,  #NAME?, #N/A, #NUM, #VALUE!, #REF!, #NULL, ####, #SPILL!, #CALC!

Fixing Errors

Here is a basic process for fixing errors below. Remember that formula errors often «cascade» through a worksheet, when one error triggers another. As you find and fix the core issue, things often come together quickly.

1. Find errors. You can use Go to Special > Formula as described below.

2. Trace the error back to its source. If this is difficult, try the trace error feature.

3. Figure out what’s causing the error. If needed, break the formula into parts.

4. Fix the error at the source. 

Video: Excel formula error examples

Video: Use F9 to debug a formula

Finding all errors

You can find all errors at once with Go To Special. Use the keyboard shortcut Control + G, then click the «Special» button. Excel will display the dialog with many options seen below. To select only errors, choose Formulas + Errors, then click «OK»:

Excel Go To Special Formula Errors

Error codes

The ERROR.TYPE function will return the numeric error code associated with an error. The table below shows the code for each error.

Error Code
#NULL! 1
#DIV/0! 2
#VALUE! 3
#REF! 4
#NAME? 5
#NUM! 6
#N/A 7
#SPILL! 9
#CALC! 14

Trapping Errors

Trapping errors is a way of «catching» errors to stop them from appearing in the first place. This makes sense when you know certain errors are likely and you want to stop error messages from appearing. There are two basic approaches:

2. Trap the error with IFERROR or ISERROR. With this approach you are watching for an error, and providing an alternative when an error is detected. This page shows a VLOOKUP example.

3. Prevent calculation until required values are available. In this case, instead of watching for an error, you try to prevent the error from occurring by checking values first. This page shows several examples.

Error codes

There are 9 error codes that you’re likely to run into at some point as you work with Excel’s formulas. This section shows examples of each formula error, with information and links on how to correct the error.

#DIV/0! error

As the name suggests, the #DIV/0! error appears when a formula tries to divide by zero, or by a value equivalent to zero. You may see a #DIV/0! error when data is not yet complete. For example, a cell in the worksheet is blank because data has not been entered, or is not yet available. You also may see the divide by zero error with the AVERAGEIF and AVERAGEIFS functions, when the criteria does not match any cells in the range.

For example, in the worksheet below, the DIV error displayed in cell D4 because C4 is empty. Empty cells are evaluated as zero by Excel, and B4 can’t be divided by zero:

Excel #DIV/0!  error example

In many cases, empty cells or missing values are unavoidable. You can use the IFERRROR function to trap the #DIV/0! and display a more friendly message if you like. 

More: How to fix the #DIV/0! error

#NAME? error

The #NAME? error indicates that Excel does not recognize something. This could be a function name misspelled, a named range that doesn’t exist, or a cell reference entered incorrectly. For example, in the screen below, the VLOOKUP function in F3 is misspelled «VLOKUP». VLOKUP is not a valid name, so the formula returns #NAME?.

Excel #NAME? error example

To fix a #NAME? error, you must find the problem, then correct spelling or a syntax. For more details and examples, see this page.

#N/A error

The #N/A error appears when something can’t be found. It tells you something is missing or misspelled. This could be a product code not yet available, an employee name misspelled, a color that doesn’t exist, etc. Often, #N/A errors are caused by extra space characters, misspellings, or an incomplete lookup table. The functions mostly commonly affected by the #N/A error are classic lookup functions, including VLOOKUP, HLOOKUP, LOOKUP, and MATCH.

For example, in the screen below, the formula in F3 returns #N/A because «Bacon» is not in the lookup table:

Excel #N/A error example

If the value in E3 is changed to «coffee», «eggs», etc. VLOOKUP will work normally and retrieve the item cost.

The best way to prevent #N/A errors is to make sure lookup values and lookup tables are correct and complete. If necessary, you can trap the #N/A error with IFERROR and display a more friendly message, or display nothing at all. ‘

More information: How to fix the #N/A error.

#NUM! error

The #NUM! error occurs when a number is too large or small, or when a calculation is impossible.  For example, if you try to calculate the square root of a negative number, you’ll see a #NUM error:

Excel #NUM! error example

In the screen above the SQRT function used to calculate the square root numbers in column B. The formula in C5 returns the #NUM! error because the value in B5 is negative, and it is not possible to compute the square root of a negative number.

You might also run into the #NUM error if you reverse start and end dates inside the DATEDIF function.

In general, fixing the #NUM! error is a matter of adjusting inputs as required to make a calculation possible again.

More information: How to fix the #NUM! error.

#VALUE! error

The #VALUE! error appears when a value is not an expected or valid type (i.e. date, time, number, text, etc.) This can happen when a cell is left blank, when a text value is given to a function that expects a numeric value, or when dates are evaluated as text by Excel. 

For example, in the screen below, cell C3 contains the text «NA», and the formula in F2 returns the #VALUE! error.

Excel #VALUE! error example

Below, the MONTH function can’t extract a month value from «apple», since «apple» is not a date:

Excel #VALUE! error example with MONTH function

Note: you may also see a #VALUE! error if you create an array formula and forget to enter the formula with Control + Shift + Enter.

To fix a #VALUE! error, you need to track down the problematic value, and supply the right type of value. For more details and examples, see this page.

#REF! error

The #REF! error is one of the most common errors you’ll see in Excel formulas.  It occurs when a reference becomes invalid. In many cases, this is because sheets, rows, or columns have been removed, or because a formula with relative references has been copied to a new location where references are invalid. 

For example, in the screen below, the formula in C8 was copied to E4. At this new location, since the range C3:C7 is relative, it becomes invalid and the formula returns #REF!:

Excel #REF error example

#REF! errors can be somewhat tricky to fix because the original cell reference is gone forever. If you delete a row or column and see #REF! errors, you should undo the action immediately and adjust formulas first.

More details on #REF! errors.

#NULL! error

The #NULL! error is quite rare in Excel, and is usually the result of a typo where a space character is used instead of a comma (,) or colon (:) between two cell references. For example, in the screen below the formula in F3 returns the #NULL error:

Excel #NULL! error example

Technically, this is because the space character is the «range intersect» operator and the #NULL! error is reporting that the two ranges (C3 and C7) do not intersect. In most cases, you can correct a NULL error by replacing a space with a comma or colon as needed.

More: How to fix the #NULL! error

#### error

Although technically not an error, you may also see a formula that displays a string of hash characters (###) instead of a normal result. For example, in the screen below, the formula in C3 is adding 5 days to the date in column B:

Excel ##### error example

In this case the hash or pound characters (###) appear because the dates in column C are formatted with a long format and do not fit into the column. To fix this error, just make the column wider.

Note: Excel won’t display negative dates. If a formula returns a negative date value, Excel will display #####.

More: How to fix ##### errors

#SPILL! error

The #SPILL error occurs when a formula outputs a spill range that runs into a cell that already contains data. For example, in the screen below, the UNIQUE function is configured to extract a list of unique names into a spill range starting in D3. Because D5 contains «apple», the operation is stopped and the formula returns #SPILL!.

Excel #SPILL error example

When «apple» is deleted from D5, the formula will work normally, and return «Joe», «Sam», and «Mary».

Details: How to fix #SPILL errors

Video: Spilling and the spill range

#CALC! error

The #CALC error occurs when a formula runs into a calculation error with an array.  For example, in the screen below, the FILTER function is set up to filter the source data in B5:D11. However, the formula is asking for all data in the group «apple», which doesn’t exist:

Excel #CALC error example

If the formula is adjusted to filter on group «A», the formula will work normally:

=FILTER(B5:D11,B5:B11="a")

Note: SPILL and CALC errors are related to «Dynamic Arrays» in Office 365 only.

0086
«Errors are an opportunity to improve». In any task or system, errors occur. Excel is no exception. While trying to do something with a formula, you will encounter various types of excel errors. These errors can make your formula/dashboard/reports absolute waste. And if you don’t know why a specific type of error has occurred, you may have to spend hours to resolve them.

While working on excel, I have encountered many excel errors. With some struggle and google searches, I worked around those errors. In this article, I will explain some common and annoying excel errors that occur in Excel. We will discuss why these errors occur and how to solve them.

What are Excel Formula Errors
While applying a formula that results in an excel defined errors (#NA, #VALUE, #NAME etc.) is called excel formula errors. These errors are caught by excel and printed on the sheets. Reasons for these errors can be, unavailable values, incorrect types of arguments, division by 0, etc. They are easy to catch and fix.

Logical errors are not caught by Excel and they are most difficult to fix. Inconsistency in data, wrong data entry, human errors etc. are a common reasons behind these errors. They can be fixed too but they take time and effort. It is better to prepare your data perfectly before doing operation on them.
Catching Excel Formula Errors:

There is some dedicated functions in excel to catch and handle a specific type of errors ( like ISNA function). But ISERROR function and IFERROR function are two functions that can catch any kind of Excel Error (except logical).
0087
Excel #NA Error
#NA error occurs in excel when a value is not found. It simply means NOT AVAILABLE. #NA error is often encountered with Excel VLOOKUP function.
0088
In above image, we are getting #NA error when we look for «Divya» in the A column. This is because «Divya is not in the list.

Solving #NA Error

If you are sure that the lookup value must exist in the lookup list then the first thing you should do is check the lookup value. Check if the lookup values are correctly spelled. If not then correct it.

Secondly, you can do a partial match with VLOOKUP or any lookup function. If you are sure that some parts of the text must match then use this.
If you are not sure that value exists or not then it can be used to check if a value exists in the list or not. In the image above, we can say that Divya is not on the list.

If you want to catch the #NA error and print or do something else instead of printing #NA error then you can use Excel ISNA function. ISNA function returns TRUE if a function returns #NA error. Using this, we can avoid #NA error. ISNA works amazingly with the VLOOKUP function. Check it out here.
0090
Excel #VALUE Error
The #VALUE occurs when the supplied argument is not of a supported type. For example, if you try to add two texts using arithmetic plus operator (+), you will get a #VALUE error. The same thing will happen if you try to get a year of an invalid date format using the YEAR function.
91
How to fix a #VALUE error?

First, confirm the data type you are referring to. If your function requires a number, then make sure that you refer to a number. If a number is formatted as text then use the VALUE function to convert them into a number. If a function requires text (like DATEVALUE function) and you referring to a number or date type then convert them to text.

If you expect that there can be a #VALUE error and want to catch them, then you can use ISERR, ISERROR or IFERROR to catch and do something else.
0093
Excel #REF Error
The ‘ref’ in #REF stands for reference. This error occurs when a formula refers to a location that does not exist. This happens when we delete cells from ranges to which a formula refers too.

In the below gif, the sum formula refers to A2 and B2. When I delete A2, the formula turns into a #REF error.
99
Solve Excel #REF error:
The best thing is to be careful before deleting cells in data. Make sure that no formula refers to that cell.

If you have #REF error already then trace then delete it from the formula.

For example, once you get a #REF error, your formula will look like this.

=A2+#REF!

You can just remove the #REF! From the formula to get an error-free formula. If you want to do it in bulk then use find and replace feature. Press CTRL+H to open find and replace. In find box, write #REF. Leave replace box empty. Hit Replace All button.
00100
If you want to readjust the reference to a new cell then do it manually and replace the #REF! With that valid reference.

Excel #NAME Error
The #NAME occurs in excel when it can’t identify a text in a formula. For example, if you misspell a function’s name, excel will show the #NAME error. If a formula refers to a name that does not exist on the sheet, it will show #NAME error.
00101
In the above image, the cell B2 has formula =POWERS(A2,2). POWERS is not a valid function in excel, hence it returns a #NAME error.

In cell B3 we have =SUM(numbers). The SUM is a valid function of excel but «numbers» named range does not exist on sheet. Hence excel returns #NAME? Error.

How to avoid #NAME error in excel?

To avoid #NAME error in excel always spell function names correctly. You can use excel suggestions to be sure that you are using a valid function. Whenever we type characters after the equals sign, excel show functions and named ranges on the sheet, starting from that character/s. Scroll down to function name or range name in the suggestion list press tab to use that function.

Excel #DIV/0! Error
As the name suggests, this error occurs when a formula results in division by zero. This error may also occur when you delete some value from a cell on which a division formula is dependent.

How to solve #DIV/0! Error.

This can be easily solved by being careful with data and putting a check if a formula will result in #DIV/0! error. Here is a sample formula to do so.

=IF(B2=0, A2, A2/B2)

We will have DIV/0 error only if the divisor is 0 or blank. Hence we check the divisor (B2), if its a zero then print A2 else divide A2 with B2. This will work for blank cells too.

Excel #NUM Error

This error occurs when a number can’t be displayed on the screen. The reason can be that the number is too small or too big to be displayed. Another reason could be that a calculation can’t be performed with given number.

This will return 4. If you want to get the negative value then use the negative sign before the function. Then of course you can use error handling function of course.
On solving #NUM error we have a dedicated article. You can check it here.

#NULL Error in Excel
This is a rare type of error. #NULL error caused by incorrect cell referencing. For example if you want to give reference of a range A2:A5 in SUM function, but by mistake you type A2 A5. This will generate #NULL error. As you can see in below image, the formula returns #NULL error.
If you replace space with column (:) then the #NULL error will be gone and you’ll get sum of the A2:A5. If you replace space with comma (,) , you will get sum of A2 and A5.

How to solve #NULL error?

As we know that the #NULL error is caused by typo. To avoid it, try to select ranges using curser instead of typing it manually.

There will be times when you have to type range address from keyboard. Always take care of the connecting symbol column (:) or comma (,) to avoid.

If you have existing #NULL error then check the references. Most probably you have missed column (:) or comma (,) between two cell references. Replace them with appropriate symbol and you are good to go.
###### Error in Excel
Sometimes we think that this error is caused due to insufficient space to show a value, but this is not the case. In this case you can just extend the width of the cell to view the value in cell. I won’t call it an error.
In fact, this error caused when we try to show a negative time value (there no such thing as negative time). For example, if we try to subtract 1 from 12:21:00 PM it will return ######. In excel the first date is 1/1/1900 00:00. If you try to subtract time that goes before that, excel will show you ###### error. The more you expand the width the more # you will get. I have elaborated it in this article.

How to avoid ###### Excel error?
Before doing arithmetic calculations in excel with time value keep these things in mind.

  • The minimum time value is  1/1/1900 00:00. You can’t have a valid date before this in excel
  • 1 is equal to 24 hours (1 day) in excel. While subtracting hours, minutes and seconds, convert them into equivalent values. For example, to subtract 1 hour from 12:21 PM, you need to subtract 1/24 from it.


Tracking Down Errors in Excel
Now we know what common excel formulas are and why they occur. We also discussed what possible solution can be for each type of excel errors.
Sometimes in excel reports, we get errors and we couldn’t know from where the error is actually occuring. It gets hard to solve these kind of errors. To track down these errors excel provides error tracing functionality in formula tab.

I have discussed error tracing in excel in detail.

Solving Logical Errors in Formula

Logical errors are tough to find and resolve. No massage shown by excel when you have a logical error in your function. Everything looks fine. But only you know that there something is wrong there. For example, while getting percentage of a part of whole, you would divide part by total (=(part/total)*100). It should be always equal or less then 100%. When you get more than 100%, you know something is wrong.

This was a simple logical error. But sometimes your data comes from several sources, in that case it gets hard to solve logical problems. One way is to evaluate your formula.

In formula tab, evaluate formula option is available. Select you formula and click on it. Each step of your calculation will be show to you that leads to your final result. Here you can check where the problem has occurred or where the calculation has gone wrong.

You can also yous trace dependents and precedents to see on which references your formula depends and what formulas depends on a perticular cell.

So yeah guys, these were some common error types every excel user faces. We learned why each type of error occurs and how can we avoid them. We learned about dedicated error handling excel function too. In this article, we have links to related pages that discuss the problem in detail. You can check them out. If you have any specific type of error that is annoying you, mention it in the comments section below. You will get the solution sortly.

Related Articles:

How to correct a #NUM! Error

Create Custom Error Bars In Excel 2016

#VALUE Error And How to Fix It in Excel

How to Trace and Fix Formula Errors in Excel

Popular Articles:

The VLOOKUP Function in Excel

COUNTIF in Excel 2016

How to Use SUMIF Function in Excel

It is not uncommon to encounter errors in spreadsheets.  But thankfully Microsoft has equipped Excel with tools to help resolve errors in Excel formula.  This includes the ability to evaluate formula and set error checking options.  

In this article we will cover step by step the options available to help resolve errors in Excel formula.

Tracing Formula Precedents and Dependents

Tracing precedents allows you to backtrack through all of the cells that are used to calculate a formula. This allows you to quickly find and identify what values a selected formula is dependent on. In the image below, we have selected cell D2. This cell contains a formula that calculates monthly payments:

Next, we clicked Formulas → Trace Precedents:

You will now see a blue arrow drawn across the current row, where all of the data used by the currently selected formula appears. Each blue dot on this arrow corresponds to a value that is used in the formula, while the arrowhead points to the end value. In this particular example, you can see that cells A2, B2, and C2 are all used by the formula in D2 to calculate the end value:

The Trace Dependents command works the opposite way of Trace Precedents: it highlights all the items that depend on the value in the current cell. This command will not work for values in the Monthly Payment column (D) because it has no dependents. However, the Loan Period (B) column does have dependents.

If we Click cell B4 and then click Formulas → Trace Dependents:

Another blue arrow will be drawn from the selected cell, pointing towards the dependent cell, which in this case is the formula in cell D4:

As you can see in the images, the Trace Precedents and Trace Dependents commands can be used at the same time.

To remove the arrows, click Formulas → Remove Arrows (drop-down arrow):

Clicking on the Formulas → Remove Arrows command directly will remove all arrows from the worksheet. The drop-down command allows you to remove all arrows, remove only precedent arrows, or remove only dependent arrows:

For this example, we have clicked Remove Arrows. All arrows on the current workbook will be removed:

Showing Formulas

When working with multiple formulas in your workbook, it is sometimes easier to view all of the formulas in the worksheet rather than their computed values.

To do this, click Formulas → Show Formulas:

All formulas will now be displayed in full. This command will also expand the column widths for all columns so that formulas are easier to read:

Click Formulas → Show Formulas again to return to the default view that shows calculated values and returns columns to their normal widths.

If you are using later versions of Excel, you can also use the function FORMULATEXT.

excel formulatext function

The syntax for FORMULATEXT is

=FORMULATEXT(reference)

where reference is the cell containing the formula that you want to display.

Working with Formulas

When you are working with a formula there are a number of options to help you avoid errors or to correct errors.

A quick reminder for those that have forgotten, you can edit the formula in a selected cell by pressing F2.  When a formula is in edit mode, the corresponding cells in the workbook are color coded.  This makes the formula easy to debug.

When you are entering a formula or in edit mode, you can check for accuracy as you go along.  Highlight any part of the formula in the formula bar and press F9.

spreadsheet errors

This will calculate that part of the formula for you and show you the result in the formula. 

However using F9 comes with a heath warning.  You must press ESC to return the formual to the original state.  If you press enter when in F9 mode, the formula will accept the calculated value and not the original formual.

Evaluating Formulas

Tracing formula precedents and dependents allows you to quickly and accurately track what a selected formula is doing. The Evaluate Formula command takes this concept one step further by showing you every single calculation that was used by the formula to reach its end value.

To use this command, first select the cell that contains the formula that you would like to work with. For this example,  we have selected cell D2:

Next, click Formulas → Evaluate Formula:

This action will open the Evaluate Formula dialog box, which will show the formula that will be evaluated. Click Evaluate to step into the first part of the formula:

In this case, you can see that “A2” in the formula was replaced to show “.06” (that cell’s actual value). Click the Step In button:

Clicking the Step In button will dive one level deeper in the formula, just as the Show Precedents/Show Dependents command would backtrack an additional level. Here, the value of B2 is shown in a separate text area. Click Step Out to hide the separate text area and progress to the next step:

Now, the next value is highlighted and the option to step in is available again. Click Evaluate to continue:

Continue clicking the Evaluate button to step through all the calculations one at a time. Stop when all the values of the formula are displayed and the entire formula is underlined. Click the Evaluate button once more:

The end result of this formula will now be displayed:

Clicking Restart will start the process over from the beginning. Click Close:

Setting Error Checking Options

Excel 2013 includes robust error checking features that have been refined over many different versions to catch just about any formula mistake. However, the effectiveness of error checking depends on Excel being properly configured.

To view and manage these settings, click File → Options:

Then, click the Formulas category. Options to help you construct formulas and check them for errors can be found here:

Using Error Option Buttons

If automatic error checking is enabled, Excel will notify you when a formula error occurs. In the sample worksheet, cell D4 contains a #NAME? error. Click cell D4 and click the option button that appears:

If you hover over the option button, you will see a ScreenTip describing the error. Clicking the option button itself will show commands for resolving the error and modifying error checking options:

Click inside the worksheet to close the menu.

Running an Error Check

The Error Check feature works similar to the spell check feature found in most word processing applications. While Excel does actively check for errors while you are creating formulas, there are some problems that Excel’s automatic checking cannot account for.

Run an error check by clicking Formulas → Error Checking:

When the Error Checking tool is launched, it will immediately search your workbook for any formula errors. Any errors that are found will be listed one at a time. In this example, an error will be found in D2:

Cell D2 contains a naming error: the cell reference “A” is incomplete. You can use the buttons on the right to:

  • Open the Help file for specific information about this error
  • Show the calculation steps that were followed in order to reach this point
  • Ignore this error for the time being
  • Fix the error by hand with the formula bar

As well, the Options button will open the Excel Options dialog to the Formulas category, where you can customize Excel’s error handling settings.

Click Next to move to the next error

If no other errors are found in the current worksheet, a dialog will be displayed. Click OK:

Понравилась статья? Поделить с друзьями:
  • Formula characters in excel
  • Forming words from another word
  • Formula bar for excel
  • Forming many words from one word
  • Formula bar excel что значит