Lookup & Reference Excel 2013 ◉ 17 views

=FORMULATEXT()

Returns a formula as a string.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=FORMULATEXT(reference)
Hover argument names in the table for details.
Output typeText
Popularity25 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =FORMULATEXT() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download FORMULATEXT.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
reference Reference Required A reference to a cell or range of cells.

▣ Examples

The formula in C2 returns the formula it finds in cell A2 as a text string so that you can easily inspect its structure. The formula entered in A2 is =TODAY(), and will return the current day in A2. The formula =TODAY() should appear as text in C2. =TODAY()
Result: =FORMULATEXT(A2)

§ Remarks

  • The FORMULATEXT function returns what is displayed in the formula bar if you select the referenced cell.
  • The Reference argument can be to another worksheet or workbook.
  • If the Reference argument is to another workbook that is not open, FORMULATEXT returns the #N/A error value.
  • If the Reference argument is to an entire row or column, or to a range or defined name containing more than one cell, FORMULATEXT returns the value in the upper leftmost cell of the row, column, or range.
  • In the following cases, FORMULATEXT returns the #N/A error value: The cell used as the Reference argument does not contain a formula. The formula in the cell is longer than 8192 characters. The formula can't be displayed in the worksheet; for example, due to worksheet protection. An external workbook that contains the formula is not open in Excel.
  • Invalid data types used as inputs will produce a #VALUE! error value.
  • Entering a reference to the cell in which you are entering the function as the argument won't result in a circular reference warning. FORMULATEXT will successfully return the formula as text in the cell.

✦ Tips

  • The FORMULATEXT function returns what is displayed in the formula bar if you select the referenced cell.
  • The Reference argument can be to another worksheet or workbook.
  • If the Reference argument is to an entire row or column, or to a range or defined name containing more than one cell, FORMULATEXT returns the value in the upper leftmost cell of the row, column, or range.
  • Entering a reference to the cell in which you are entering the function as the argument won't result in a circular reference warning. FORMULATEXT will successfully return the formula as text in the cell.

⚠ Common Errors

#N/A If the Reference argument is to another workbook that is not open, FORMULATEXT returns the #N/A error value. In the following cases, FORMULATEXT returns the #N/A error value: The cell used as the Reference argument does not contain a formula.
Fix: Check the input cell or manage the error with IFNA
#VALUE! Invalid data types used as inputs will produce a #VALUE! error value.
Fix: برای Reference مرجع سلول معتبر وارد کنید، نه مقدار متنی یا عددی نامعتبر.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.