ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Return a formula as text string to a cell (https://www.excelbanter.com/excel-worksheet-functions/83805-return-formula-text-string-cell.html)

Sharon

Return a formula as text string to a cell
 
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
--
Sharon

Gary''s Student

Return a formula as text string to a cell
 
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
--
Gary''s Student


"Sharon" wrote:

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
--
Sharon


Don Guillett

Return a formula as text string to a cell
 
Put this in a REGULAR code module and then just type =stringit(c4)

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

--
Don Guillett
SalesAid Software

"Sharon" wrote in message
...
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
--
Sharon




Peo Sjoblom

Return a formula as text string to a cell
 
There is no such beast but you can roll your own


http://www.mvps.org/dmcritchie/excel/formula.htm

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Sharon" wrote in message
...
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
--
Sharon




Sharon

Return a formula as text string to a cell
 
Thanks to y'all!! Really hit the spot.
--
Sharon


"Peo Sjoblom" wrote:

There is no such beast but you can roll your own


http://www.mvps.org/dmcritchie/excel/formula.htm

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Sharon" wrote in message
...
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
--
Sharon






All times are GMT +1. The time now is 02:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com