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
FORMULATEXTreturns what is displayed in the formula bar when selecting a cell.- If the cell passed into
FORMULATEXTreferences the cell that contains theFORMULATEXTformula, thenFORMULATEXTwill 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) |