Quick Navigation
FORMULATEXT Function
Summary
The FORMULATEXT function extracts and returns the formula from a specified cell as a readable text string. Perfect for formula auditing, documentation, and dynamic formula display in reports.
Syntax
FORMULATEXT(reference)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | Reference |
Yes | A reference to a cell or range containing the formula you want to display as text |
Using the FORMULATEXT Function
FORMULATEXT is invaluable for creating formula documentation sheets, building dynamic dashboards that show both results and formulas, and auditing complex spreadsheets. It reveals exactly what formula is in a cell without altering the original calculation.
Common FORMULATEXT Examples
Extract Formula from Cell
=FORMULATEXT(A2)
If A2 contains =TODAY(), this returns '=TODAY()' as text for inspection.
Document Multiple Formulas
=FORMULATEXT(INDIRECT("B"&ROW()))
Creates a dynamic list showing formulas from column B.
Self-Referencing Formula
=FORMULATEXT(C1)
Safely displays its own formula without circular reference error.
Frequently Asked Questions
Common Errors and Solutions
#N/A - No Formula
Cause: Referenced cell contains a value, not a formula
Solution: Ensure the reference points to a cell with a formula
#N/A - External Workbook
Cause: Formula references a closed external workbook
Solution: Open the referenced workbook
#N/A - Formula Too Long
Cause: Formula exceeds 8192 characters
Solution: Shorten the formula or use alternative approach
#VALUE!
Cause: Invalid reference type
Solution: Use proper cell/range reference
Notes
- Maximum formula length: 8192 characters
- Single cell result from multi-cell ranges (upper-left cell)
- Self-referencing works without circular reference warnings
- Protected sheets may prevent formula display
Compatibility
Available in: Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365, Excel Online
Not available in: Excel 2010, Excel 2007, Excel 2003
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2013+