VBA Function to Show Cell Formula
The following UDF will return the formulae for a given cell reference:
Function Show_Cell_Formulae(Cell As Range) As String
Show_Cell_Formulae = "Cell " & Cell.Address & " has the formulae : ' " & Cell.Formula & " '"
End Function
So if we have:

Where the cell B7 has the formulae : ‘=MAX(B5:G5) then we can type in another cell:
B9 = Show_Cell_Formulae(b7)

And we get a text string with the cell reference and the formulae contained within it.
To download the .XLSM file for this article, click here
Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
Get answers right away at our AE Excel Support Forums!
Leave a comment
| Trackback


