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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top