Return a formula as text string to a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - I would be really grateful if anybody knows a function to return the
formula contained in one cell to another cell as a text string?

Thanks
 
Try this tiny UDF:


Function textit(r As Range) As String
textit = Chr(39) & r.Formula
End Function

If A1 has a formula, then =textit(A1) will display it
 
Put this in a REGULAR code module and then just type =stringit(c4)

Function stringit(x)
stringit = x.Formula
End Function
 
Back
Top