- Advanced Excel Functions Tutorial
- Advanced Excel Functions - Home
- Compatibility Functions
- Advanced Excel Functions - Cube
- Database Functions
- Date & Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Advanced Excel Functions - Logical
- Lookup & Reference Functions
- Math & Trignometric Functions
- Statistical Functions
- Useful Resources
- Quick Guide
- Useful Resources
- Discussion
FORMULATEXT Function
Description
The FORMULATEXT function returns a formula as a string.
Syntax
FORMULATEXT (reference)
Arguments
Argument | Description | Required/ Optional |
---|---|---|
reference | A reference to a cell or range of cells. | Required |
Notes
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 cannot be displayed in the Worksheet, for example, due to Worksheet protection.
If the Reference argument is to another Workbook that is not open.
If the Reference argument is to a cell whose formula cannot be viewed, for example, if it is protected.
Invalid data types used as inputs will produce a #VALUE! error value.
If the Reference argument is not a valid cell reference, FORMULATEXT returns the #VALUE! error value.
Entering a reference to the cell in which you are entering the function as the argument will not result in a circular reference warning. FORMULATEXT will successfully return the formula as text in the cell.
Applicability
Excel 2013, Excel 2016