Formula Errors
Formula Errors
Formula Errors
This chapter teaches you how to deal with some common formula
errors in Excel.
##### error
When your cell contains this error code, the column isn't wide enough to
display the value.
img1
1. Click on the right border of the column A header and increase the
column width.
img2
Tip: double click the right border of the column A header to automatically fit
the widest cell in column A.
#NAME? error
The #NAME? error occurs when Excel does not recognize text in a formula.
img3
img4
#VALUE! error
Excel displays the #VALUE! error when a formula has the wrong type of
argument.
img5
#DIV/0! error
Excel displays the #DIV/0! error when a formula tries to divide a number by
0 or an empty cell.
img7
img8
Excel displays the #REF! error when a formula refers to a cell that is not
valid.
img9
2. Delete column B. To achieve this, right click the column B header and
click Delete.
img10
img11
4. To fix this error, you can either delete +#REF! in the formula of cell B1 or
you can undo your action by clicking Undo in the Quick Access Toolbar (or
press CTRL + z).
img12
2. IfError
This example illustrates the IFERROR function in Excel.
1. For example, Excel displays the #DIV/0! error when a formula tries to
divide a number by 0.
img13
3. IsError
This example illustrates the ISERROR functionin Excel.
1. For example, Excel displays the #DIV/0! error when a formula tries to
divide a number by 0.
img15
2. Use the IF and the ISERROR function. If a cell contains an error, the
value 5 is returned. If not, the value 100 is returned.
img16
4. Circular Reference
A formula in a cell that directly or indirectly refers to its own cell is called
a circular reference. This is not possible.
1. For example, the formula in cell A3 below directly refers to its own cell.
This is not possible.
img17
2a. For example, the formula in cell C2 below refers to cell C1.
img18
img19
img20
2d. So far, everything's OK. Now change the value in cell C1 to the formula
=C4. Cell C1 refers to cell C4, cell C4 refers to cell C3, cell C3 refers to cell
C2, and cell C2 refers to cell C1. In other words, the formula in cell C1
indirectly refers to its own cell. This is not possible.
img21
3. To find your circular references, on the Formulas tab, click the down
arrow next to Error Checking, and click Circular References.
img22
5. Formula Auditing
Trace Precedents | Remove Arrows | Trace Dependents | Show Formulas |
Error Checking | Evaluate Formula
Trace Precedents
You have to pay $96.00. To show arrows that indicate which cells are used
to calculate this value, execute the following steps.
img24
Result:
img25
As expected, Total cost and Group size are used to calculate the Cost per
person.
img26
As expected, the different costs are used to calculate the Total cost.
Remove Arrows
img27
Trace Dependents
img28
Result:
img29
Show Formulas
img30
Result:
img31
Note: instead of clicking Show Formulas, you can also press CTRL + (`).
You can find this key above the tab key.
Error Checking
To check for common errors that occur in formulas, execute the following
steps.
img32
2. On the Formulas tab, in the Formula Auditing group, click Error
Checking.
img33
Result. Excel finds an error in cell C13. The formula tries to divide a
number by 0.
img34
Evaluate Formula
img35
3. Click Evaluate four times.
img36
img37
img39
You don't have to worry about floating point errors. They are rare. Even if
your worksheet contains a floating point error, in most cases, this causes
no problems.
3. However, if you compare the value in cell C8 with another value, this can
happen.
img40
img41