Skip to content
Google Sheets

FORMULATEXT function in Google Sheets

Returns the formula as a string. .

=FORMULATEXT(cell)

FORMULATEXT syntax and parameters

One argument, one required.

  • cellrangeRequired

FORMULATEXT examples

Formulas you'll actually reuse.

  1. Show a neighbouring cell's formula as text in an audit column:

    =FORMULATEXT(D2)

    Result"=B2*(1+C2)"

  2. Flag hard-coded cells in a column that should hold formulas:

    =IF(ISFORMULA(D2), FORMULATEXT(D2), "hard-coded")

    Result"hard-coded"

FORMULATEXT in Excel

Same name — your formula ports as-is.

Try FORMULATEXT in the playground

Edit the example — nothing to install.

Preloaded with the FORMULATEXT formula from Example 1 — change anything and watch it respond.

Loading the editor…

FORMULATEXT errors

What they mean — and the fixes.

  • #N/A

    The referenced cell holds a plain value, not a formula — guard with ISFORMULA when a column mixes both.