How to Show Formula Text With Formula in Excel

Learn multiple Excel methods to show formula text with formula with step-by-step examples, practical business applications, error-handling tips, and performance guidance.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Show Formula Text With Formula in Excel

Why This Task Matters in Excel

When you audit a workbook, train new analysts, or prepare documentation for compliance, you often need to reveal not just the result of a calculation but the exact formula that generated that result. Showing the formula text alongside its output eliminates guesswork, speeds up reviews, and supports accurate knowledge transfer.

Consider a finance team handing a complicated cash-flow workbook to external auditors. The auditors do not want to trace every cell one by one. If a companion column displays the literal text of each formula, they can instantly see the logic, spot circular references, or confirm correct cell ranges. In engineering, a project manager might publish a summary sheet that prints both calculations and underlying formulas for specification sign-off. Human-resources departments frequently add salary-budget workbooks to shared portals; by exposing the formulas, they make maintenance easier when staff changes occur.

Excel is well suited to this problem because it already stores the formula as metadata. You only need the right function or technique to surface that metadata in a visible cell. Without this skill, teams often rely on screenshots or toggle Show Formulas mode, leading to cluttered prints or accidental edits. Worse, a reviewer may overwrite a formula when trying to retype or document it manually.

Mastering the skill of displaying formula text connects naturally to auditing, error trapping, data lineage, and transparent reporting. It also teaches you to think carefully about relative versus absolute references, named ranges, and version compatibility—concepts that strengthen every aspect of professional Excel use.

Best Excel Approach

The single most efficient way to show a formula’s text is the built-in FORMULATEXT function, introduced in Excel 2013. It is purpose-designed for this exact task and works on the majority of formulas you encounter in day-to-day spreadsheets.

Why it is best:

  • Zero setup: No VBA, no add-ins, and no manual quotation marks
  • Dynamic: Updates automatically when the underlying formula changes
  • Error-aware: Returns #N/A if a cell does not contain a formula, letting you trap or filter that state easily

You should prefer FORMULATEXT when:

  • Your workbook will run on Excel 2013 or later (Windows/macOS)
  • You want a live link that refreshes whenever someone edits the source formula
  • You need to reference formulas on other sheets in a secure, read-only fashion

Choose an alternative when backwards compatibility earlier than 2013 is mandatory or when you want additional commentary beyond the literal text.

Syntax:

=FORMULATEXT(reference)
  • reference – A single cell that contains a formula.
  • Returns – A text string showing the exact characters you typed in the formula bar.

Alternative with fallback:

=IF(ISFORMULA(reference), FORMULATEXT(reference), "")

This variant is handy when reference may sometimes be a plain value. It avoids the #N/A error and keeps your report clean.

Parameters and Inputs

The only required input for FORMULATEXT is the reference to a cell. That reference can be:

  • A direct address such as A1
  • A structured reference (e.g., Table1[Net Amount])
  • A 3-D reference across sheets (e.g., Sheet1:Sheet3!A1)
  • A name defined through Name Manager

Data type: reference must resolve to a single cell, not a multi-cell range. If you supply an entire range, Excel evaluates only the top-left cell.

Optional considerations:

  • Wrap inside TEXTJOIN or CONCAT if you want to prepend labels or combine explanations.
  • If the cell is blank or contains a constant, FORMULATEXT throws #N/A. Trap this with IFERROR, IF(ISFORMULA()), or LET.

Inputs must refer to cells contained within open workbooks. If the source workbook is closed, FORMULATEXT returns #N/A in many Excel builds. Keep the source file open or use Power Query to copy formulas as text when cross-workbook linking.

Edge cases:

  • Very long formulas greater than 8,192 characters are truncated.
  • Array formulas entered with legacy Ctrl+Shift+Enter are supported, but dynamic-array spill ranges are not captured; only the anchor cell’s formula is returned.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine a training worksheet where cell B2 holds the simple profit formula:

=B1-A1

Sample data:

  • A1 – 1,250 (Cost)
  • B1 – 2,000 (Revenue)
  • B2 – =B1-A1 (Profit)

Goal: Show the exact formula text in C2.

Step 1 – Click C2.
Step 2 – Enter:

=FORMULATEXT(B2)

Result: The cell displays “=B1-A1” as plain text.
Why it works: FORMULATEXT interrogates the metadata of B2 and returns the entire character string, including the equal sign. When someone changes B2 to, say, =(B1-A1)*1.1, C2 updates instantly.

Screenshot description: Column A shows Cost, column B Revenue and Profit, column C shows the formula in quotes.

Common variations:

  • Display formulas one row above their results by referencing relative addresses such as =FORMULATEXT(B3) in B2.
  • Use cell styles “Input” and “Formula” to color formula-text columns differently for clarity.

Troubleshooting:

  • If you see #N/A, verify B2 still contains a formula and that you typed the reference correctly.
  • If a reviewer accidentally converts B2 to a value (Copy → Paste Values), C2 shows #N/A immediately, giving you a quick visual cue.

Example 2: Real-World Application

Scenario: Quarterly expense tracker in a consulting firm. Sheet “Totals” has a summary table aggregating four regional sheets (North, South, East, West). Management requests a printable appendix listing every aggregation formula because auditors want traceability.

Data setup:

  • Totals!C6 – `=SUM(`North!C6,South!C6,East!C6,West!C6) (Total Travel)
  • Totals!C7 – `=SUM(`North!C7,South!C7,East!C7,West!C7) (Total Lodging)
    … and so on.

Step-by-step:

  1. Insert a new column D labeled “Formula”.
  2. In D6 enter:
=FORMULATEXT(C6)
  1. Copy D6 downward alongside every total row.
  2. Format column D with wrap text so long formulas break across lines.
  3. Use Conditional FormattingNew Rule → “Use a formula to determine which cells to format”. Rule: =ISERROR(D6) → format with light red fill. This visually flags any totals that have lost their formula link.

Business value: Auditors can filter by blank or red cells to see totals missing formulas. They no longer waste time toggling Show Formulas mode for the entire worksheet, which previously caused column widths to explode and printouts to overflow.

Integration tip: Combine with Page LayoutGroup → Outline so that the formula column can be collapsed for everyday use and expanded only during audits.

Performance note: Because FORMULATEXT is a non-volatile function, it does not recalc when unrelated cells change, so adding hundreds or thousands of formula-text mirrors has negligible impact on workbook recalculation times.

Example 3: Advanced Technique

Goal: Build a dynamic “formula dictionary” for a financial model containing 200 calculation cells across multiple sheets. You want a single list that updates as you add new formulas.

Tools:

  • Dynamic arrays (Excel 365)
  • LET, FILTER, SORT, FORMULATEXT, ISFORMULA, TOCOL
  • Named range called “ModelArea” referring to [ModelStart]:[ModelEnd] where all calculation rows reside.

Steps:

  1. On sheet “Dictionary”, cell A2 enter:
=LET(
 data, TOCOL(ModelArea, 1),
 formulas, FILTER(data, ISFORMULA(data)),
 FORMULATEXT(formulas)
)
  1. Press Enter. Because Excel 365 supports dynamic arrays, the result spills automatically, listing every formula in the model in the order they appear.

  2. In B2, spill a parallel array of cell addresses:

=LET(
 data, TOCOL(ModelArea, 1),
 formulas, FILTER(data, ISFORMULA(data)),
 ADDRESS(ROW(formulas), COLUMN(formulas))
)
  1. Combine both arrays horizontally with HSTACK (or CHOOSECOLS) to produce a two-column table: Address | Formula Text.

Error handling: If a new row is inserted outside “ModelArea”, it will not be captured. Make “ModelArea” a dynamic named range or Excel Table for resilience.

Performance optimization: Avoid volatile functions like INDIRECT inside the model. Because the dictionary references hundreds of cells, each recalculation of those volatiles would trigger FORMULATEXT and slow the workbook.

Professional tip: Protect the “Dictionary” sheet as read-only so reviewers can see formulas but cannot accidentally edit them.

Tips and Best Practices

  1. Pair FORMULATEXT with ISFORMULA to hide #N/A errors gracefully.
  2. Use wrap text and row auto-height for columns that house long formulas to maintain readable print layouts.
  3. Color-code formula-mirror columns with subdued tones (light gray) to differentiate from data while avoiding distraction.
  4. Lock and hide the formula-text columns before sharing externally if your model includes confidential references; they can reveal business logic you might not intend to disclose.
  5. For documentation, export formula lists to PDF via File → Export → Create PDF/XPS after expanding relevant outline levels, ensuring reviewers cannot accidentally change formulas.
  6. Combine FORMULATEXT with structured references in Excel Tables to obtain human-readable formulas such as “=[@Revenue]-[@Cost]”, which is far clearer than B2-B1 in isolation.

Common Mistakes to Avoid

  1. Referencing a multi-cell range: =FORMULATEXT(B2:B5) evaluates only B2. Use a relative reference in each row, or wrap with dynamic array logic.
  2. Forgetting version compatibility: Colleagues on Excel 2010 will see #NAME?. Provide a fallback sheet with static copies or use alternate methods (see next section).
  3. Reliance on Show Formulas mode for printing: Users often leave the workbook in that mode, causing column widths to grow and calculation to pause. Embedding formula text next to outputs prevents that toggle.
  4. Ignoring hidden characters: If the source formula includes line breaks added with Alt+Enter, they also appear in FORMULATEXT and may break reports. Use SUBSTITUTE to remove CHAR(10) before publishing.
  5. Copy-pasting the formula-text column back into the model: Analysts sometimes overwrite real formulas with their text counterparts by mistake. Protect or lock those columns.

Alternative Methods

Sometimes FORMULATEXT is not available or not suitable. Here are viable alternatives:

MethodExcel VersionProsCons
Apostrophe copy ('=)All versionsSimple, no function callsManual process, not dynamic
Show Formulas mode (Ctrl+`)AllInstant toggle, great for quick checksPrints poorly, affects entire sheet, risk of leaving mode on
VBA macro to capture formulasAny with macros enabledTotal control, can create custom reports and export to textRequires macro security clearance, maintenance burden
Power Query extract2010+ with add-inCan load formula strings to separate sheet, refresh on demandNot real-time; needs refresh; cannot easily preserve relative references
Office Scripts / JavaScriptExcel for webAutomated generation in cloud workbooksRequires scripting permissions, relatively new ecosystem

Use the apostrophe copy method when you only need a one-time snapshot. Opt for VBA or Office Scripts when automating audit packs across dozens of workbooks. Choose Power Query to consolidate formula inventories across multiple files into a master catalog.

FAQ

When should I use this approach?

Use FORMULATEXT when you want a living, synchronized reference to the underlying formula, especially for documentation, training, or audit worksheets that evolve over time.

Can this work across multiple sheets?

Yes. FORMULATEXT(Sheet2!B10) returns the exact formula in Sheet2!B10, provided Sheet2 is in the same open workbook. For cross-workbook references, both files must be open.

What are the limitations?

FORMULATEXT cannot process cells in closed workbooks, multi-cell array entries beyond the anchor, or formulas exceeding about 8,192 characters. Pre-2013 Excel versions do not recognize the function.

How do I handle errors?

Wrap your call in IF(ISFORMULA(ref), FORMULATEXT(ref), "") or IFERROR(FORMULATEXT(ref),"") to prevent #N/A errors from cluttering reports. You can also conditionally format error cells to highlight problems.

Does this work in older Excel versions?

No native function exists before Excel 2013. Use the alternative methods listed above, such as VBA or manual apostrophe copies. If upgrading is feasible, migrating to a newer version simplifies the task.

What about performance with large datasets?

FORMULATEXT is a non-volatile, lightweight function. Even with thousands of instances, recalculation overhead is minimal. However, dynamic array dictionaries referencing tens of thousands of cells can slow opening times; limit the monitored range or use Manual calculation mode for heavy models.

Conclusion

Being able to show formula text alongside its calculated value empowers transparent, auditable, and maintainable workbooks. FORMULATEXT makes the task effortless for modern Excel users, while alternative approaches cover compatibility gaps. Mastery of this technique integrates naturally with best practices in auditing, training, and collaborative modeling. Practice the examples, incorporate error handling, and experiment with dynamic arrays to build living formula dictionaries that elevate the professionalism of every spreadsheet you share.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.