The FORMULATEXT function returns a formula as a string.

Parts of a FORMULATEXT function

FORMULATEXT(cell)

PartDescription
cellThe cell to be verified as containing a formula.

Notes

  • FORMULATEXT returns what is displayed in the formula bar when selecting a cell.
  • If the cell passed into FORMULATEXT references the cell that contains the FORMULATEXT formula, then FORMULATEXT will properly handle this and avoid a circular reference.
  • If a range is passed into FORMULATEXT, only the top left most cell is evaluated.

Examples

ABC
1ValueFormula
220=FORMULATEXT($A2)
318=FORMULATEXT($A3)
410=FORMULATEXT($A4:$A5)
515=FORMULATEXT($A4:$A5)
6=FORMULATEXT($A6)=FORMULATEXT($A6)