You have a complex Excel formula written by a colleague or inherited from an old spreadsheet. It works, but you cannot understand how it arrives at its result. Manually tracing each function, cell reference, and nested condition can take hours. Copilot in Excel can analyze that formula and explain its logic step by step. This article shows you how to use Copilot to reverse-engineer any formula, break down its components, and even generate a plain-English summary of what it does.
Key Takeaways: Reverse-Engineer Formulas with Copilot
- Copilot pane > Explain this formula: Copilot generates a step-by-step breakdown of any selected formula, showing each function and its purpose.
- Copilot prompt: “List the cell references in this formula”: Quickly extract all input cells and ranges that the formula depends on, including indirect references.
- Copilot prompt: “Rewrite this formula using named ranges”: Copilot can convert a complex formula with raw cell addresses into a more readable version using named ranges from your workbook.
How Copilot Analyzes and Explains a Formula
Copilot in Excel uses a large language model integrated with the Excel calculation engine. When you select a cell that contains a formula and ask Copilot to explain it, the tool does not just parse the text. It evaluates the formula logic, identifies nested functions, and maps cell references to the actual data in your worksheet. This means the explanation is context-aware: Copilot knows if a cell contains a lookup value, a sum range, or a conditional criterion.
Reverse-engineering a formula with Copilot requires no special permissions beyond a Microsoft 365 Copilot license. The feature works on any formula, regardless of length or complexity, as long as the workbook is saved to OneDrive or SharePoint. Copilot can handle formulas that use IF, VLOOKUP, XLOOKUP, SUMIFS, INDEX-MATCH, LET, LAMBDA, and custom VBA user-defined functions, though the latter may produce less detailed explanations if the UDF code is not accessible.
Prerequisites
Before you start, confirm the following:
- You have a Copilot for Microsoft 365 license assigned to your account.
- The workbook is stored on OneDrive for Business or SharePoint Online. Local files must be uploaded first.
- The formula you want to analyze is in a single cell. For multi-cell array formulas, select the entire array range.
- Copilot is enabled in Excel. If the Copilot button is not visible, go to the View tab and select Copilot.
Steps to Reverse-Engineer a Formula with Copilot
These steps assume you have a complex formula already in a cell. The example formula used here is: =IF(AND(C2>=100, D2="Approved"), VLOOKUP(E2, Inventory!A:D, 4, FALSE), "Pending").
- Select the cell containing the formula
Click the cell that holds the formula you want to reverse-engineer. Make sure only that cell is selected. If the formula spans multiple cells, select the entire range. - Open the Copilot pane
Go to the Home tab and click the Copilot button in the ribbon. Alternatively, press Alt+Ctrl+Space to open the Copilot pane directly. The pane opens on the right side of the Excel window. - Ask Copilot to explain the formula
In the Copilot chat box, type: Explain this formula and press Enter. Copilot analyzes the selected formula and generates a response that breaks down each function and condition. - Review the explanation
Copilot displays a numbered list or paragraph describing the formula. For the example above, Copilot might say: “This formula checks if the value in C2 is 100 or greater AND if D2 contains ‘Approved’. If both conditions are true, it performs a vertical lookup of E2 in the Inventory table and returns the value from the fourth column. Otherwise, it returns ‘Pending’.” - Ask for specific details
You can drill down into any part of the formula. Type follow-up prompts such as:
– What does the VLOOKUP part do?
– List all cell references in this formula
– Which cells does the IF condition check?
Copilot responds with targeted information, including the exact cell addresses and their current values if available. - Generate a plain-English summary
Type: Write a one-paragraph summary of what this formula does. Copilot produces a short, readable description that you can copy into a documentation cell or comment. This summary is useful for sharing with team members who are not formula experts. - Rewrite the formula with named ranges
If the formula uses raw cell references like C2 or Inventory!A:D, ask Copilot: Rewrite this formula using named ranges from the workbook. Copilot scans the workbook for defined names and substitutes them. For example, C2 might become [@Quantity] if a table column named Quantity exists. This makes the formula much easier to read. - Test the rewritten formula
After Copilot provides the new version, copy it into a blank cell and verify the result matches the original formula. If the result differs, check whether the named ranges map correctly. You can then ask Copilot: Why is the rewritten formula returning a different value? Copilot will compare the two formulas and point out discrepancies.
Common Issues and Limitations When Reverse-Engineering Formulas
Copilot says it cannot analyze this formula
This usually happens when the formula contains unsupported functions or references external workbooks. Copilot can analyze most built-in Excel functions, but it struggles with volatile functions like INDIRECT, OFFSET, and RAND when they depend on external links. To work around this, replace the external reference with a static value or copy the data into the same workbook.
Copilot returns a generic explanation that does not match the actual data
Copilot sometimes describes the formula structure correctly but misidentifies the data context. For example, it might say “the VLOOKUP looks up an employee ID” when the column actually contains product codes. This happens when column headers are ambiguous or missing. Add clear headers above the data columns and ask Copilot to re-explain. You can also type: Focus on the data in column E to steer the analysis.
Copilot does not show the formula breakdown in real time
Copilot does not highlight cells or step through the formula like the Evaluate Formula dialog. It provides a textual explanation only. For visual step-through, use Excel’s built-in Evaluate Formula tool on the Formulas tab. Copilot is better for understanding the overall logic, not for debugging one calculation step at a time.
The rewritten formula with named ranges breaks
If Copilot substitutes a named range that does not exist or points to the wrong area, the formula returns a #NAME? error. Verify that the named range exists in the Name Manager on the Formulas tab. If the name is missing, define it manually and ask Copilot to try again. You can also tell Copilot: Use only named ranges that start with ‘tbl’ to limit substitutions to table names.
Copilot Explain vs Traditional Formula Auditing Tools
| Item | Copilot Explain | Excel Evaluate Formula / Trace Precedents |
|---|---|---|
| Output format | Plain-English text, numbered steps, or summary | Visual cell-by-cell stepping or arrow lines |
| Ease of use | Type a prompt, get instant explanation | Click through each step manually |
| Handles nested functions | Yes, describes each nested layer | Shows intermediate results one step at a time |
| Identifies cell references | Lists all references with current values | Draws arrows to precedent cells |
| Supports named ranges | Can rewrite formula using named ranges | Displays names if defined, but does not rewrite |
| Works with external links | Limited, may produce errors | Shows external references if workbook is open |
Copilot Explain is best for understanding high-level logic and documenting formulas. Traditional tools like Evaluate Formula are better for debugging a single calculation step. Use both together: start with Copilot to get the big picture, then switch to Evaluate Formula to inspect a specific intermediate value.
You can now use Copilot in Excel to decode any complex formula, extract its cell references, and produce a readable summary. Start by selecting the formula cell and opening the Copilot pane. For deeper analysis, ask follow-up questions about specific function arguments. To make formulas more maintainable, use the rewrite feature to convert raw addresses into named ranges. As an advanced tip, save the Copilot-generated explanation as a cell comment by copying the text and using the New Comment option on the Review tab. This preserves the documentation directly in the workbook for future users.