FORMULATEXT
Information
Returns the formula of a referenced cell as text.
Translations
EnglishFORMULATEXT
FrenchFORMULETEXTE
SpanishFORMULATEXTO
GermanFORMELTEXT
ItalianFORMULA.TESTO
PortugueseFÓRMULATEXTO
DutchFORMULETEKST
PolishFORMUŁA.TEKST
RussianФОРМУЛАТЕКСТ
TurkishFORMÜLMETNİ
CzechFORMULATEXT
HungarianKÉPLETSZÖVEG
SwedishFORMELTEXT
DanishFORMELTEKST
FinnishKAAVANTEKSTI
Syntax
FORMULATEXT(reference)Arguments
referenceCell containing a formula
Examples
=FORMULATEXT(A1)=SUM(B:B)
Shows formula from A1
=FORMULATEXT(Sheet2!C5)Formula text
From another sheet
=IF(ISERROR(FORMULATEXT(A1)),"No formula",FORMULATEXT(A1))Safe check
Handles cells without formulas
Tips & Best Practices
- •Returns #N/A if cell has no formula
- •Useful for documentation
- •Available in Excel 2013 and later
Common Mistakes
- •Using FORMULATEXT on a cell that contains only a value, not a formula, and being surprised by the resulting #N/A error instead of an empty result
- •Forgetting that FORMULATEXT shows the formula as literal text, not its calculated result, so it's easy to confuse the two when reviewing a sheet quickly
- •Expecting FORMULATEXT to update automatically in a way that reflects formatting changes to the original formula - it always reflects the current formula text exactly, but any error in referencing the wrong cell won't be obvious at a glance
Related Functions
ISFORMULAChecks whether a cell contains a formula and returns TRUE/FALSE, often used before FORMULATEXT to avoid a #N/A error.CELLRetrieves other information about a cell, like its formatting or address, rather than the text of its formula.IFERRORCommonly wraps FORMULATEXT to substitute a friendly message when the referenced cell doesn't contain a formula.Frequently Asked Questions
Why does FORMULATEXT return #N/A?
The referenced cell doesn't contain a formula - it's either empty or holds a plain value. Wrap it in IFERROR or check first with ISFORMULA to avoid the error.
Does FORMULATEXT show the formula's result or the formula itself?
The formula itself, as literal text - like "=SUM(B:B)" rather than whatever number that formula calculates.
Can FORMULATEXT reference a cell on another sheet?
Yes, use a normal cross-sheet reference, like FORMULATEXT(Sheet2!C5), and it returns that cell's formula as text.
Need to translate a formula using FORMULATEXT?
Use our translator to convert your complete formula
