=FORMULATEXT(reference)
The FORMULATEXT function returns the formula used in a cell as a text string. This is useful if you want to refer to the text of a formula instead of the result of a formula. For example, if cell A1 contains the formula =A2+A3, then =FORMULATEXT(A1) will return the text string =A2+A3.
The FORMULATEXT function is not limited to just one cell reference. You can also use it to return the text of a formula which uses multiple cell references. For example, if cell A1 contains the formula =A2+A3+A4, then =FORMULATEXT(A1) will return the text string =A2+A3+A4.
The FORMULATEXT function can also be used with other Sourcetable functions. For example, if cell A1 contains the formula =SUM(A2:A4), then =FORMULATEXT(A1) will return the text string =SUM(A2:A4).
You can also use the FORMULATEXT function to return the text of nested formulas. For example, if cell A1 contains the formula =SUM(A2:A4*A5), then =FORMULATEXT(A1) will return the text string =SUM(A2:A4*A5).
The FORMULATEXT function returns a formula as a text string from a cell reference. It was introduced in Excel 2013 and can take up to 8192 characters. With Sourcetable, it can return more than one result from a range with formulas.