The FORMULATEXT function returns a formula as a string.
Parts of a FORMULATEXT function
FORMULATEXT(cell)
Part | Description |
---|---|
cell | The 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 theFORMULATEXT
formula, thenFORMULATEXT
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
A | B | C |
---|---|---|
1 | Value | Formula |
2 | 20 | =FORMULATEXT($A2) |
3 | 18 | =FORMULATEXT($A3) |
4 | 10 | =FORMULATEXT($A4:$A5) |
5 | 15 | =FORMULATEXT($A4:$A5) |
6 | =FORMULATEXT($A6) | =FORMULATEXT($A6) |