Auditing formulas
Trace precedents and dependents, evaluate a formula step by step, check the workbook with nine error-checking rules, and watch cells.
The Auditing group on the Formulas tab helps you understand and check a workbook’s formulas: where a result comes from, what it feeds, how it is worked out, and where the mistakes are.
Trace precedents
Precedents are the cells a formula reads.
- Click the cell with the formula.
- Click the up-arrow button in Formulas › Auditing (its tooltip is Trace precedents — what feeds cell**. Press again to go a level deeper.**).
Arrows are drawn on the grid from each precedent to the cell, and the cell is ringed. A range the formula reads, such as B2:B9, is drawn as one box with one arrow, not an arrow per cell. A precedent on another sheet is drawn as a short dashed arrow from a small square, in amber rather than blue.
Click the button again to go one level further back — the precedents of the precedents. Each level’s arrows are fainter than the one before. When there are no more levels, further clicks leave the arrows as they are.
The status bar sums up what was found, for example 5 precedents, across 2 levels, 1 on another sheet. If the trail leads back to the starting cell, it adds and the trail comes back to cell. If the cell reads no other cells, it says cell does not read any other cell.
Trace dependents
Dependents are the cells whose formulas read the current cell.
- Click the cell.
- Click the down-arrow button in Formulas › Auditing (Trace dependents — what reads cell**. Press again to go a level deeper.**).
Dependents are found on every sheet of the workbook; those on other sheets are drawn as off-sheet arrows. Click again to go a level deeper. If nothing reads the cell, the status bar says Nothing on this sheet reads cell.
Tracing from a different cell, or switching between precedents and dependents, starts a new trace.
Remove arrows
Click the eraser button in Formulas › Auditing (Remove the trace arrows). The status bar says Arrows removed. When there are no arrows, the button is unavailable (No arrows to remove).
Evaluate a formula
Evaluate Formula shows how a formula is worked out, one step at a time.
- Click the cell with the formula.
- Click Evaluate in Formulas › Auditing. It is unavailable when the cell holds no formula (… holds no formula to take apart).
The Evaluate dialog, titled with the cell’s address, lists every step at once. Each numbered step shows the formula as it stands, then the part being worked out and its result, such as B2*C2 → 240. The last line shows the Result.
IF, IFS, IFERROR, IFNA, CHOOSE and SWITCH are worked out only as far as the branch the formula takes, so the dialog never shows an error from a branch that isn’t used. Click Close when you are done.
Error checking
Error checking looks through every formula and value in the workbook for common mistakes.
- Click Errors in Formulas › Auditing.
- Read the list in the Error checking dialog. Each item shows the sheet and cell, the rule it breaks, and a sentence about what is wrong.
- For an item:
- Click Go to to close the dialog and select the cell.
- Click Fix, where offered, to apply the suggested correction. Hover over Fix to see what it will write. The list is checked again afterwards, and the status bar says cell fixed.
- Click Close.
The buttons along the top of the dialog turn each rule on or off; the list updates as you change them. Seven rules start on and two start off, as in Excel. With nothing found, the dialog says so.
| Rule | Starts | What it finds | Fix |
|---|---|---|---|
| Formula produces an error | On | A formula whose result is an error. The message names the error and explains it. | — |
| Inconsistent formula | On | A formula that differs from the matching formulas on either side of it | — |
| Formula omits adjacent cells | On | A formula such as SUM that stops one cell short of numbers next to its range | Widens the range |
| Number stored as text | On | Text that reads as a number, which SUM skips and sorting treats as a word | Converts it to a number |
| Two-digit year in a formula | On | A date written with a two-digit year, which different computers may read as 1930 or 2030 | — |
| Inconsistent calculated column formula | On | A cell in a table’s calculated column that is empty, holds a typed value, or uses a different formula | Restores the column’s formula |
| Data in a table breaks its own validation | On | A table cell whose value breaks the data validation rule on it | — |
| Formula refers to an empty cell | Off | A formula that reads a cell with nothing in it | — |
| Unlocked cell containing a formula | Off | A formula in an unlocked cell, which stays editable when the sheet is protected | — |
Watch window
The Watch window is a panel that shows the values of chosen cells while you work elsewhere — on another sheet, or far down the same one.
Watch cells
- Click the Watch window button in Formulas › Auditing (Watch window — keep an eye on cells while you work elsewhere). The Watch window panel opens on the right.
- Select the cells to watch, on any sheet.
- Click + at the top of the panel (Watch the selected cells).
Empty cells in the selection are skipped. The status bar says Watching followed by the number of cells, or explains that the cells are empty or already watched.
Each watched cell shows its sheet and address (and its defined name, if it has one), its current value — (blank) when empty — and its formula. Values update as the workbook recalculates.
Use the list
| To | Do this |
|---|---|
| Go to a watched cell | Click its row. The sheet switches if needed. |
| Stop watching one cell | Click × on its row (Stop watching cell) |
| Stop watching every cell | Click Clear all at the bottom of the panel |
| Close the panel | Click × at the top, or the Watch window button again |
Something unclear or out of date on this page? Tell us.