Category: FUNCTION | Updated: 2026-11-22

How to Use the FORMULATEXT Function in Google Sheets | Display a Cell's Formula as Text

FORMULATEXT Function

The FORMULATEXT function returns the formula entered in a specified cell as a text string of the formula itself (starting with =) rather than its calculated result.

Syntax

=FORMULATEXT(cell)
  • cell: Specifies the cell reference from which you want to retrieve the formula as text.

Practical Table Example

This example extracts and displays the original formulas from cells showing calculated results.

Cell A (Original Input) B (Column A Display) C (Formula) D (Column C Display)
1 100 100 =FORMULATEXT(A1) #N/A
2 200 200 =IFNA(FORMULATEXT(A2), "Manual Input") Manual Input
3 =SUM(A1:A2) 300 =FORMULATEXT(A3) =SUM(A1:A2)
4 =A3*1.1 330 =FORMULATEXT(A4) =A3*1.1

Common Errors and Precautions

  • #N/A error: Occurs when the referenced cell does not contain a formula (such as a number, text, or blank cell). Combining it with ISFORMULA or IFNA is standard practice.
  • Formulas converted to text: '=SUM(A1:A2) entered as text with a leading ' is not a formula, so referencing it with FORMULATEXT results in a #N/A error.

Frequently Asked Questions

Q. What happens if you reference a cell without a formula using FORMULATEXT?

A. A #N/A error is returned. To prevent errors, combine it with the IFNA function, such as '=IFNA(FORMULATEXT(A1), "No formula")'.

Q. When is the FORMULATEXT function useful?

A. It is useful for listing formulas when creating manuals or specifications, or for auditing and reviewing which calculation formulas are entered in which cells.