FORMULATEXT Function

FORMULATEXT Function

FORMULATEXT Function

Return the formula from a cell as text. FORMULATEXT is useful for audits, documentation, and checking whether formulas are consistent across a sheet.

ExcelClash Team
PUBLISHED

Summary

The Excel FORMULATEXT function returns the formula in a referenced cell as text. Instead of showing the calculated result, it shows the actual formula string that Excel is using.

This is useful in audits, documentation, and model review. For example, a workbook can display its own formulas beside the outputs, or a checker sheet can test whether a formula contains a particular function name.

FORMULATEXT is not a calculation function in the usual sense. Its value is that it exposes formula logic so that the formula itself can be inspected.

Purpose

Show a formula as text

Returns the literal formula from a referenced cell so it can be reviewed, displayed, or searched.

Return Value

Formula string

Returns the formula, including the leading = sign, as text.

Syntax

=FORMULATEXT(reference)

reference is the cell that contains the formula you want to show. If the referenced cell does not contain a formula, FORMULATEXT returns #N/A.

Because the result is text, it can be combined with functions such as SEARCH, FIND, or exact comparisons to analyze the formula itself.

Arguments

  • reference - The cell or range reference whose formula you want to display.

The referenced cell must actually contain a formula. If it contains a hard-coded number or text, FORMULATEXT does not return that value; it returns an error instead.

FORMULATEXT vs Other Functions

FORMULATEXT is best understood by comparing it with functions that answer different questions about a cell.

Function Main Question Use When
FORMULATEXT What formula is in this cell? You want to display or inspect the formula itself
ISFORMULA Does this cell contain a formula? You only need a TRUE/FALSE answer
CELL What property does this cell have? You need information such as address, format, or filename

Use FORMULATEXT when the exact formula matters. Use ISFORMULA when you only need to know whether a formula is present at all.

Using FORMULATEXT

One common use of FORMULATEXT is self-documentation. A workbook can show both the result and the formula that produced it, which helps reviewers understand the model without entering each cell individually.

Another use is consistency checking. If two cells should contain the same logic pattern, their formula text can be compared directly. If one row was overwritten with a hard-coded value, FORMULATEXT can help reveal that difference.

It can also support simple formula scanning. Because the returned formula is text, a workbook can search for terms such as OFFSET, INDIRECT, or a particular sheet name.

  • Use FORMULATEXT when you need to display a formula instead of its result.
  • Use it with text functions if you want to inspect the formula for keywords.
  • Expect #N/A if the referenced cell does not contain a formula.

Example 1 - Standard Calculation Transparency

This formula shows the formula stored in B3 rather than the calculated result. That makes it useful in review sheets or documentation tables where the logic itself needs to be visible.

=FORMULATEXT(B3)
Check Answer
Challenge #1
Target: Sheet1!F1
Extract Calculation Code

Retrieve the raw formula from cell B1. Formula: =FORMULATEXT(B1).

Example 2 - Dynamic Rule Documentation

Displaying the formula from another cell can create live documentation inside the workbook. If the source formula changes later, the displayed formula text changes too.

=FORMULATEXT(B2)
Check Answer
Challenge #2
Target: Sheet1!F2
Audit Aggregate Logic

Display the formula used in B2. Formula: =FORMULATEXT(B2).

Example 3 - Automated Volatility Audit Flag

Here FORMULATEXT is wrapped in SEARCH to check whether the formula contains the word OFFSET. This is a practical example of using formula text as data that can be analyzed.

=ISNUMBER(SEARCH("OFFSET", FORMULATEXT(B1)))
Check Answer
Challenge #3
Target: Sheet1!F3
Document IF Statement

Show the formula stored in B10. Formula: =FORMULATEXT(B10).

Example 4 - Relative Logic Verification

Comparing two FORMULATEXT results shows whether the formulas are identical as text. This can help detect rows that no longer use the same logic pattern as the rest of the sheet.

=FORMULATEXT(A1)=FORMULATEXT(B1)
Check Answer
Challenge #4
Target: Sheet1!F4
Spill Range Audit

Extract the formula from B5. Formula: =FORMULATEXT(B5).

Conclusion Recap

  • Summary: FORMULATEXT returns a cell's formula as text.
  • Syntax: =FORMULATEXT(reference).
  • Core setup: The referenced cell must contain a formula, or Excel returns #N/A.
  • Best use: Audits, documentation, formula comparison, and keyword checks inside formulas.
Tactical Arena
Select Scenario:
Share FORMULATEXT Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.