ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to convert formula to text (https://www.excelbanter.com/excel-worksheet-functions/122802-how-convert-formula-text.html)

odd

How to convert formula to text
 
I need to convert a formula in a cell, a reference to an other spreadsheet,
to text. I.e. Cell 'Spreadsheet1'!A6 contains formula: ='spreadsheet2'!B4
in cell 'Spreadsheet1!H6 i want the text 'spreadsheet2'!B4 to appear.

How do I do that?

vezerid

How to convert formula to text
 
Function FormulaBody(r as Range)
with r.cells(1,1)
if left(.formula) = "=" then
FormulaBody = mid(.formula,2,len(.formula))
else
FormulaBody = .formula
endif
end with
end function

Then,
=FormulaBody(B3)

HTH
Kostis Vezerides

odd wrote:
I need to convert a formula in a cell, a reference to an other spreadsheet,
to text. I.e. Cell 'Spreadsheet1'!A6 contains formula: ='spreadsheet2'!B4
in cell 'Spreadsheet1!H6 i want the text 'spreadsheet2'!B4 to appear.

How do I do that?



[email protected]

How to convert formula to text
 
Hello,

I suggest to have a look he
http://www.sulprobil.com/html/it_quality.html

Regards,
Bernd



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

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