Back to Functions

FORMULATEXT

Returns the formula as a string.

LookupFORMULATEXT(cell)

The FORMULATEXT function in Google Sheets returns the formula used in a specified cell as a text string, rather than its calculated value. It's a great debugging and documentation tool for anyone auditing or explaining complex spreadsheets. Dive into our comprehensive guide to learn how it works.

Parameters

  • cell: The reference to a cell that contains a formula.

Step-by-Step Tutorial

  1. Displaying the formula in a cell:

    • Example: If A1 contains the formula =SUM(B1:B10), then =FORMULATEXT(A1) will return the text "=SUM(B1:B10)".
  2. Auditing a spreadsheet:

    • Example: Place =FORMULATEXT(C2) in a neighboring column to display the formula behind each row's calculated result, making it easy to review logic without clicking into each cell.

Use Cases and Scenarios

  1. Spreadsheet Auditing: Quickly review and document all formulas used across a workbook.
  2. Debugging: Compare expected versus actual formulas to spot copy-paste or reference errors.
  3. Teaching and Documentation: Show formula logic alongside results when training others on how a sheet works.

Related Functions

  • ISFORMULA: Checks whether a cell contains a formula.
  • CELL: Returns information about the position, formatting, or content of a cell.

Related Articles

No related articles available for the FORMULATEXT function.

Newsletter

More FORMULATEXT examples coming soon.

We are building short, practical updates for Sheets power users.