FormulaCraft

FORMULATEXT

FORMULATEXT returns the formula contained in a referenced cell as a text string. This is helpful for documentation, training materials, or auditing spreadsheets where you want to display the formula alongside its result without switching to formula view. If the referenced cell contains a value instead of a formula, FORMULATEXT returns an error.

Excel
=FORMULATEXT(B2)
Google Sheets
=FORMULATEXT(B2)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1B2 is the cell reference whose formula you want to display as text.
  2. 2FORMULATEXT returns the exact formula string, including the leading equals sign.
  3. 3If B2 contains a constant value rather than a formula, the function returns #N/A.

Need a version for your data?

Try: “Show the formula in cell B2 as readable text next to it

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: