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.

This is helpful because many audit sheets need to show both the answer and how that answer was produced. FORMULATEXT lets the workbook display the logic without opening each source cell one by one.

=FORMULATEXT(B3)
Check Answer
Challenge #1
Target: Sheet1!D1

Retrieve the raw formula from cell 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.

That makes the example practical for model notes and handoff sheets. The documentation stays tied to the real formula, so it updates automatically instead of going stale.

=FORMULATEXT(B2)
Check Answer
Challenge #2
Target: Sheet1!D2

Display the formula used in cell 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.

This shows that FORMULATEXT is not only for displaying formulas. Once the formula is returned as text, other text functions can inspect it and help flag patterns the reviewer wants to watch for.

=ISNUMBER(SEARCH("OFFSET", FORMULATEXT(B1)))
Check Answer
Challenge #3
Target: Sheet1!D3

Show the formula stored in cell 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.

That is useful in templates with repeated formulas across many rows. If one row was changed manually, this kind of comparison can expose the mismatch quickly.

=FORMULATEXT(A1)=FORMULATEXT(B1)
Check Answer
Challenge #4
Target: Sheet1!D4

Extract the formula from cell B5.

Conclusion Recap

FORMULATEXT is for moments when the formula matters more than the answer. In this lesson, it helped show the logic behind a result, document formulas inside the sheet, search for risky functions, and compare one formula with another.

That is why it fits review and audit work so well. It does not calculate anything new, it just shows the formula as text, and it only works when the referenced cell really contains a formula.

  • 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
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.