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.
Show a neighbouring cell's formula as text in an audit column:
=FORMULATEXT(D2)Result
"=B2*(1+C2)"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/AThe referenced cell holds a plain value, not a formula — guard with ISFORMULA when a column mixes both.
Related functions
More ways Google Sheets gets this done.
- ADDRESSReturns a cell reference as a string.LookupExcel
- CHOOSEReturns an element from a list of choices based on index.LookupExcel
- COLUMNReturns the column number of a specified cell, with `A=1`.LookupExcel
- COLUMNSReturns the number of columns in a specified array or range.LookupExcel
- GETPIVOTDATAExtracts an aggregated value from a pivot table that corresponds to the specified row and column headings.LookupExcel
- HLOOKUPHorizontal lookup. Searches across the first row of a range for a key and returns the value of a specified cell in the column found.LookupExcel