Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets FORMULATEXT Function: How to Use It

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

FORMULATEXT returns the formula in a referenced cell as text, so you can see exactly what calculation is driving a result. To use it, click an empty cell, type =FORMULATEXT(A1) (replacing A1 with your target cell), and press Enter. If the cell contains a formula, you will see it as a text string; if it contains a static value, you will get a #N/A error.

What You'll Need

  • A Google account and access to Google Sheets (desktop browser or mobile app).
  • A spreadsheet with at least one cell that contains a formula.
  • Basic familiarity with cell references (e.g., A1, B2).

Step-by-Step

  1. Open your Google Sheet and identify the cell whose formula you want to extract. For example, if cell B2 contains =SUM(A1:A10), note its address.
  2. Click an empty cell where you want the formula text to appear.
  3. Type =FORMULATEXT( and then either click the target cell or type its reference, such as B2. Close the parenthesis: =FORMULATEXT(B2).
  4. Press Enter. The cell will display the formula from B2 as text, e.g., =SUM(A1:A10).
  5. If you need to copy the formula text to another location, use Ctrl+C (or Cmd+C on Mac) and paste as plain text with Ctrl+Shift+V (or Cmd+Shift+V).
  6. To apply FORMULATEXT to multiple cells, drag the fill handle (the small square at the bottom-right of the cell) down or across. The reference will adjust relative to each row or column.
  7. If you want to show the formula as a static string without the leading equals sign, wrap it in a function like =MID(FORMULATEXT(B2),2,1000) to remove the first character.

Menu labels and function behavior can differ slightly by version, device, or region, but FORMULATEXT works the same in the web and mobile apps.

Common Mistakes

  • Referencing a cell with a static value: FORMULATEXT returns #N/A if the target cell does not contain a formula. Double-check that the cell actually has an equals sign and a function.
  • Forgetting the closing parenthesis: A missing parenthesis causes a parse error. Always close the function.
  • Using an invalid reference: If you reference a cell outside the sheet or a deleted range, you will get a #REF! error.
  • Expecting live updates: FORMULATEXT returns the formula as text at the moment of calculation. If the target cell's formula changes, the text updates automatically, but if you copy the result as values, it becomes static.
  • Referencing a cell that contains FORMULATEXT itself: This creates a circular reference and returns an error. Avoid self-referencing.

Tips

  • Use FORMULATEXT to audit complex spreadsheets by listing all formulas in a column next to their results.
  • Combine with IFERROR to handle non-formula cells gracefully: =IFERROR(FORMULATEXT(A1),"No formula").
  • To extract just the function name, use =REGEXEXTRACT(FORMULATEXT(A1),"[A-Z]+").
  • Remember that FORMULATEXT returns the formula exactly as written, including absolute references ($A$1) and sheet names.
  • On mobile, you can enter the function manually or use the function list; the steps are the same.

Troubleshooting

If FORMULATEXT returns an error, check these in order:

  • #N/A: The referenced cell does not contain a formula. Verify the cell address and that it starts with =.
  • #REF!: The reference is invalid (e.g., deleted row or column). Update the reference.
  • #VALUE!: The argument is not a valid reference (e.g., you passed a text string like "A1" without quotes). Use a cell reference or a range.
  • #NAME?: The function name is misspelled. Ensure it is FORMULATEXT, not FORMULA_TEXT.
  • Circular dependency: If the cell with FORMULATEXT is referenced by the target cell, you will get a circular reference error. Move the FORMULATEXT to a different cell.
  • If the formula text appears truncated, check the cell's formatting; it may be set to text and not wrapping. Adjust column width or enable wrap text.

Frequently Asked Questions

Can FORMULATEXT reference a cell in another sheet?

Yes, use the sheet name with an exclamation mark, e.g., =FORMULATEXT(Sheet2!A1).

Does FORMULATEXT work with array formulas?

Yes, it returns the entire array formula as text, including the curly braces if present.

What happens if the referenced cell contains a formula that returns an error?

FORMULATEXT still returns the formula text, not the error. It shows the formula itself, not the result.

Can I use FORMULATEXT to copy a formula to another cell?

No, it returns text. To copy a formula, use copy and paste or the fill handle directly on the original cell.

Is FORMULATEXT available in all Google Sheets versions?

Yes, it is a standard function in Google Sheets and works in both the web and mobile apps.

Why does FORMULATEXT show a #N/A error even though the cell has a formula?

Check that the cell reference is correct and that the cell actually contains a formula (starts with =). If the cell contains a formula that returns a blank, FORMULATEXT still works; #N/A usually means the cell is static.