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
-
Displaying the formula in a cell:
- Example: If
A1contains the formula=SUM(B1:B10), then=FORMULATEXT(A1)will return the text"=SUM(B1:B10)".
- Example: If
-
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.
- Example: Place
Use Cases and Scenarios
- Spreadsheet Auditing: Quickly review and document all formulas used across a workbook.
- Debugging: Compare expected versus actual formulas to spot copy-paste or reference errors.
- 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.