CELLFORMULA

Returns the worksheet formula in a cell. For a range with more than one cell, it returns the formula the first cell in the range.

Syntax

CELLFORMULA(range_input)

range_input - is the range (cell) which you want to find out the cell comment.

Example

If cell C5 contains the formula:
=SUM(A1:B5)
Then, =CELLFORMULA(C5) returns the answer “=SUM(A1:B5)”.