How to Debug Excel Formulas: Evaluate Step by Step and Find Circular References
Find out why a spreadsheet is wrong: evaluate formulas step by step, trace precedents and dependents, and fix #DIV/0!, #N/A and circular references.

How to Debug Excel Formulas: Evaluate Step by Step and Find Circular References
A wrong number in a spreadsheet can be expensive, and the cause is rarely where the error appears. The Excel Formula Debugger recalculates a workbook in your browser and shows how each formula reaches its answer.
Evaluate step by step
Select a formula and the debugger lists each sub-expression in calculation order with its value. For =ROUND(D60.2,2), you see D6, then D60.2, then the rounded result. The first step that looks wrong points to the problem.
Precedents and dependents
Precedents are the cells a formula reads; dependents are the formulas that read a cell. The grid colours them green and orange. If a tax rate is wrong, its dependents show everything that changes with it.
The common errors and their causes
| Error | Usual cause | Fix |
|---|---|---|
| #DIV/0! | Dividing by zero or an empty cell | Wrap in IF or IFERROR, or fill the input |
| #N/A | VLOOKUP or MATCH cannot find the value | Check spelling, spaces and exact-match setting |
| #VALUE! | Text where a number is expected | Convert the text, remove stray characters |
| #REF! | A reference to a deleted cell or a column outside the range | Rebuild the range |
| #NAME? | Misspelt function or name | Correct the name |
Circular references
A circular reference happens when a formula depends on itself, directly or through other cells, such as F2 = F3 + 1 and F3 = F2 × 2. Excel warns once and may then show zero. The debugger lists each chain cell by cell so you can break it.
Excel's precedence quirks
Excel evaluates −2^2 as 4, because negation is applied before the power, and 2^3^2 as 64, because powers are evaluated left to right. Many other languages give −4 and 512. Use brackets to make intent clear.
Worked example
In the sample invoice, D8 adds the subtotal 42 and VAT 8.4 to give 50.4. F4 divides by B4, which is zero, so it shows #DIV/0!, and F2 and F3 form a circular chain. Fixing B4 or wrapping the division in IF clears the error.
Model hygiene
- Keep inputs, calculations and outputs on separate, labelled sheets.
- Avoid hard-coded numbers inside formulas.
- Use exact match (FALSE) in VLOOKUP unless the table is sorted and you want an approximate match.
Work in small, saved steps
Every tool in this series keeps your work as a project in your own browser. Make a change, check the preview, and use undo (Ctrl+Z) or redo (Ctrl+Y) freely; nothing is lost while you experiment. Before a big change, save a named copy from the Projects menu, so you can return to it later or compare two versions side by side. Export the project file when you want to move it to another computer or keep a backup, and import it again whenever you need it.
Privacy by design
The processing happens in the page itself. Files you open are read by code running on your device, results are calculated locally, and nothing is sent to a server or stored in a cloud account. That makes the tool suitable for customer lists, financial data and other material you would not upload to an unknown website. If a component such as a file reader or a map outline is downloaded from a public CDN, only that open-source code or public data is fetched, never your own content.
Share the result clearly
When you pass the output to colleagues, say where the data came from, when it was exported, and which settings you used, so that someone else can repeat the work and get the same answer. Keep the original file unchanged and store the cleaned or calculated version separately. A short note with the assumptions, filters and date saves a lot of questions later and makes the result easier to trust.


%20Generator&c=%23991b1b&k=documents)
