The Excel FORMULATEXT function returns a formula as a text string from given reference. You can use FORMULATEXT to extract a formula as text from a cell. If you use FORMULATEXT on a cell that doesn't contain a formula, you'll get an #N/A error.
Get the formula in a cell
The formula as text
reference - Reference to cell or cell range.
You can use the FORMULATEXT function to extract a formula as text from a cell. Once extracted, you can work with the formula like any other text.
Remember that you can temporarily display all formula in a worksheet with a keyboard shortcut.
If you just want to test to see if a cell contains a formula or not, use the ISFORMULA function.
If you use FORMULATEXT on a cell that doesn't contain a formula, you'll get an #N/A error.
You can reference another workbook, but if the workbook is not open, you'll get an #N/A error.
The Excel ISFORMULA function returns TRUE when a cell contains a formula, and FALSE if not. When a cell contains a formula ISFORMULA will return TRUE regardless of the formula's output or error conditions.
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.