
Return the formula from a cell as text. FORMULATEXT is useful for audits, documentation, and checking whether formulas are consistent across a sheet.
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.
Returns the literal formula from a referenced cell so it can be reviewed, displayed, or searched.
Returns the formula, including the leading = sign, as text.
=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.
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 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.
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.
#N/A if the referenced cell does not contain a formula.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)
Retrieve the raw formula from cell B1.
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)
Display the formula used in cell B2.
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)))
Show the formula stored in cell B10.
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)
Extract the formula from cell B5.
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.
FORMULATEXT returns a cell's formula as text.=FORMULATEXT(reference).#N/A.Tell your friends about this post