How to Detect and Correct Errors in Excel Formulas on Your Mac
It happens. Everyone makes an error from time to time when entering formulas in cells. Especially in a worksheet in which formula results are calculated into other formulas, a single error in one formula can spread like a virus and cause miscalculations throughout a worksheet. To prevent that from happening, Excel offers several ways to correct errors in formulas. You can correct them one at a time, run the error checker, and trace cell references.
By the way, if you want to see formulas in cells instead of formula results, go to the Formulas tab, click the Show button, and click the Show Formulas button on the drop‐down list. Sometimes seeing formulas this way helps to detect formula errors.
Correcting errors one at a time
When Excel detects what it thinks is a formula that has been entered incorrectly, a small green triangle appears in the upper‐left corner of the cell where you entered the formula. And if the error is especially egregious, an error message, a cryptic three or four letters preceded by a pound sign (#), appears in the cell. Here are some common error messages.
|Message||What Went Wrong|
|#DIV/0!||You tried to divide a number by a zero (0) or an empty
|#NAME||You used a cell range name in the formula but the name
isn’t defined. Sometimes this error occurs because you type
the name incorrectly.
|#N/A||The formula refers to an empty cell, so no data is available
for computing the formula. Sometimes people enter N/A in a cell as
a placeholder to signal the fact that data isn’t entered yet.
Revise the formula or enter a number or formula in the empty
|#NULL||The formula refers to a cell range that Excel can’t
understand. Make sure that the range is entered correctly.
|#NUM||An argument that you use in your formula is invalid.|
|#REF||The cell or range of cells that the formula refers to
|#VALUE||The formula includes a function that was used incorrectly,
takes an invalid argument, or is misspelled. Make sure that the
function uses the right argument and is spelled correctly.
To find out more about a formula error and perhaps correct it, select the cell with the green triangle and click the Error button. This small button appears beside a cell with a formula error after you click the cell. The drop‐down list on the Error button offers opportunities for correcting formula errors and finding out more about them.
Running the error checker
Another way to tackle formula errors is to run the error checker. When the checker encounters what it thinks is an error, the Error Checking dialog box tells you what the error is. To run the error checker, choose Tools→Error Checking.
If you see clearly what the error is, click the Edit in Formula Bar button and repair the error in the Formula bar. If the error isn’t one that really needs correcting, either click the Ignore Error button or click the Next button to send the error checker in search of the next error in your worksheet.
Tracing cell references
In a complex worksheet in which formulas are piled on top of one another and the results of some formulas are computed into other formulas, it helps to be able to trace cell references. By tracing cell references, you can see how the data in a cell figures into a formula in another cell.
Also, if the cell contains a formula, you can tell which cells the formula gathers its data from to make its computation. You can get a better idea of how your worksheet is constructed, and in so doing, find structural errors more easily.
A cell tracer is a blue arrow that shows the relationships between cells used in formulas. You can trace two types of relationships:
Tracing precedents: Select a cell with a formula in it and trace the formula’s precedents to find out which cells are computed to produce the results of the formula. Trace precedents when you want to find out where a formula gets its computation data. Cell tracer arrows point from the referenced cells to the cell with the formula results in it.
To trace precedents, go to the Formulas tab and click the Trace Precedents button.
Tracing dependents: Select a cell and trace its dependents to find out which cells contain formulas that use data from the cell you selected. Cell tracer arrows point from the cell you selected to cells with formula results in them. Trace dependents when you want to find out how the data in a cell contributes to formulas elsewhere in the worksheet. The cell you select can contain a constant value or a formula in its own right (and contribute its results to another formula).
To trace dependents, go to the Formulas tab and click the Trace Dependents button.Figure 2: Tracing the relationships between cells.
To remove the cell tracer arrows from a worksheet, go to the Formulas tab and click the Remove Arrows button. You can open the drop‐down list on this button and choose Remove Precedent Arrows or Remove Dependent Arrows to remove only cell‐precedent or cell‐dependent tracer arrows.