If your Excel Formula or Function contains an error that Excel can detect, you may be presented with an error message (eg. #VALUE!, #N/A). The type of this message provides information about your Excel formula error, which may assist you in identifying and fixing the problem.
The table below provides a quick reference guide of what each of the different error messages means. Further information and examples are provided further down the page.
|#NULL!||-||Arises when you refer to an intersection of two ranges that don't intersect.|
|#DIV/0!||-||Occurs when a formula attempts to divide by zero.|
|#VALUE!||-||Occurs if of the variables in your formula is of the wrong type (e.g. text value when a numeric value is expected).|
|#REF!||-||Arises when a formula contains an invalid cell reference.|
|#NAME?||-||Occurs if Excel doesn't recognise a formula name or doesn't recognise text within a formula.|
|#NUM!||-||Occurs when Excel encounters an invalid number.|
|#N/A||-||Indicates that a value is not available to a formula.|
Excel produces the
#NULL! error when you attempt to intersect two ranges that don't intersect. For example, the formula
=SUM(B1:B10 A5:D7) will return the sum of the values in the range B5:B7 (the intersection of the ranges B1:B10 and A5:D7).
However, if you entered the formula
=SUM(B1:B10 C5:D7) you would get the
#NULL! error, because the ranges B1:B10 and C5:D7 do not intersect.
This can be corrected by reviewing your formula, and either changing the variables to ensure you get a valid intersection or using the Excel Iferror function to identify a null range and take alternative action. For example:
#DIV/0! is produced when a formula attempts to divide by zero. Clearly, a division by zero produces infinity, which cannot be represented by a spreadsheet value, so Excel returns the
For example, if cell C1 contains the value 0, then the formula:
will return the
This problem can be overcome by using the Excel IF function to identify a possible division by 0 and, in this case, produce an alternative result. For example:
#VALUE! Excel formula error is generated when one of the variables in a formula is of the wrong type. For example, the simple formula
=B1+C1 relies on cells B1 and C1 containing numerical values. Therefore, if either B1 or C1 contains a text value, this results in the
The best way to approach this error is to check each individual part of your formula, to make sure that the argument has the required type. If your function contains nested functions, it is a good idea to copy each of the arguments into a separate cell, to check what they evaluate to. If necessary, break down each term further, to find out its components, until you find the source of the error.
If your Excel cell shows the
#REF! formula error, this indicates an invalid cell reference. There are 2 common situations that cause this Excel formula error to be generated:
The formula previously referenced a cell which has now been deleted.
The formula has been copied from a cell that references a range near to the edge of the spreadsheet. When the formula is copied to a new cell, the range changes, in line with the Excel Relative Referencing Rules, so that the resulting range would (hypothetically) be for cells outside of the spreadsheet range.
If you now copy the above formula into cell A2, Excel attempts to adjust the range Sheet2!1:1048576 to Sheet2!2:1048577. - However, row number 1048577 does not exist (as there are only 1048576 rows in Excel 2007/2010/2013). Therefore, in this case, you will get the
In both of the above examples, if you click on the cell that contains the
#REF! error, you will see that the cell reference within the cell has been replaced with
#REF!. Therefore, in order to fix this error, you need to re-enter the correct cell references into your formula.
(Note that in the second example above, you could avoid the error by making the cell references absolute, - ie. change the reference Sheet2!1:1048576 to Sheet2!$1:$1048576)
When Excel encounters text in a formula, it will try to interpret the text as a reference, a named range, or a function name. If the text is not recognised as any of these, the
#NAME? error will be generated.
For example, if you intended to type in the function
=SUM(B1:C2), but you accidentally type
=SM(B1:C2), Excel will fail to recognise the function name "SM" and so will generate the
Therefore, the way to approach a
#NAME? Excel function error is to check your function names, references and named ranges have the correct spellings, and check that any variables that are meant to be text values are entered in double quotes. If your formula contains nested functions, check the results of these individually, until you identify the source of the error.
#NUM! Excel formula error is generated when Excel encounters an invalid number in a formula. For example, all square numbers are positive, so there is no such thing as a square root of a negative number (unless we enter the world of imaginary numbers). Therefore, the Excel function
SQRT(-2) will generate the
#NUM! error, to indicate the invalid negative number argument to the square root function.
Therefore, the way to fix a
#NUM! error is to check each of the numeric arguments in your formula. As with the other argument types, if your formula is nested or built up of multiple parts, it is a good idea, to break down the formula and evaluate each argument separately.
#N/A Excel formula error is produced when a value is not available to your formula. For example, the example below shows an attempt to use the Vlookup function to find the value "Cabbage" in column C of the spreadsheet, and return the associated cost from column D. However, as "Cabbage" does not appear in column C, the VLOOKUP function is unable to find this value and so returns the
Therefore, in order to get to the bottom of a
#N/A error, you need to look at the values that the formula is accessing and identify why the required value is not available.
If you think the value you are trying to look up is in the list you are searching, visit the Failure To Match Values page for more help with this problem.