To display formula as text.
The Excel FORMULATEXT function display the syntax of a reference cell as a string.
For example, Reference cell B5 contains the addition of two number =5+2 which return 7, = FORMULATEXT(B5) return a text value “=5+2”, not the result of the calculations.
reference – A reference to a cell or range of cells.
The formula in text format.
The FORMULATEXT can be a great feature to highlight the cell that links to a given formula.
Note that formula is in a text format and cannot be part of any other calculation.
There are other options to display the formula in Excel:
- By using keyboard shortcut – Ctrl+` (Windows) and ^+` (Mac). This formula converts all formulas to text in a worksheet.
- If you want to highlight only a single cell, at the start of formula we can enter an apostrophe (‘) or space “ “ to convert into text. Example ‘=A23*(1+C$1) is a text format and won’t return calculations.
For example, If there is no formula it return #N/A (Not Available) like here in cell C8 (Result).