FORMULATEXT

Returns the formula entered in a cell as text string

Synstax of Excel FORMULATEXT formula:
=FORMULATEXT(reference)

In words:
=Return the formula as text string (in this reference)

Examples of Excel FORMULATEXT formula

Suppose in cell A1 you have =SUM(H7:S6)

Put this formula in any cell:

=FORMULATEXT(A1) and it will return =SUM(H7:S6)