A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
For built-in step-by-step debugging in Excel, the main tool is Evaluate Formula.
Use it this way:
- Select the cell that contains the formula.
- Go to Formulas > Formula Auditing > Evaluate Formula.
- Select Evaluate repeatedly to see each underlined part of the formula calculated in order.
- If the underlined part refers to another formula, select Step In to inspect that formula.
- Use Step Out to return to the previous formula.
- Continue until all parts have been evaluated.
- Use Restart to replay the evaluation, or Close to end it.
This is the built-in step-by-step method that integrates directly with normal Excel workflows.
Useful details and limits:
- Only one cell can be evaluated at a time.
- Step In is not available if the same reference appears a second time in the formula, or if the reference is in a separate workbook.
- Some parts of formulas using IF and CHOOSE are not evaluated; in those cases, #N/A can appear in the Evaluation box.
- If a referenced cell is blank, Excel shows 0 in the Evaluation box.
- Some functions can recalculate when the worksheet changes and may show results in the dialog that differ from what appears in the cell, including RAND, AREAS, INDEX, OFFSET, CELL, INDIRECT, ROWS, COLUMNS, NOW, TODAY, and RANDBETWEEN.
For larger formulas, the recommended approach is still to use Evaluate Formula, but combine it with breaking the logic into smaller parts so each intermediate result is easier to inspect. Excel documentation also points to this tool as a way to help find where a larger formula is going wrong, even if it does not always explain why the formula is broken.
A practical example from Excel documentation:
-
=IF(AVERAGE(D2:D5)>50,SUM(E2:E5),0) - Excel can show intermediate stages such as:
-
=IF(40>50,SUM(E2:E5),0) -
=IF(False,SUM(E2:E5),0) - final result based on the false branch
-
This makes it easier to see which nested function or logical test is producing the unexpected result.
If the goal is to find hidden issues such as text or spaces causing errors like #VALUE!, Evaluate Formula is also useful because Excel steps through each part individually and can expose unexpected values such as hidden spaces.
- How to avoid broken formulas in Excel
- Detect formula errors in Excel
- Evaluate a nested formula one step at a time
- VALUE is Excel's way of saying, "There's something wrong with the way your formula is typed. Or, there's something wrong with the cells you are referencing." The error is very general, and it can be hard to find the exact cause of it. The information on this page shows common problems and solutions for the error.