ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Displaying in a cell the formula from another cell (https://www.excelbanter.com/excel-discussion-misc-queries/36452-displaying-cell-formula-another-cell.html)

Arjan

Displaying in a cell the formula from another cell
 
Hi,

is it possible to show (in text) the formula from the cell next to it? For
example, in cell A1 I have the formula ='D:My Documents\[test.xls]Sheet1'!D18
which gives as result "18". Can I display in cell A2 the text "D:My
Documents\[test.xls]Sheet1'!D18" somehow?

Arjan

Nick Hodge

Arjan

How about a user defined function? Enter this and take the cell you wish to
return the formula string from as the single parameter

Function ShowFormula(rngInput As Range) As Variant
Application.Volatile True
ShowFormula = rngInput.Formula
End Function

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Arjan" wrote in message
...
Hi,

is it possible to show (in text) the formula from the cell next to it? For
example, in cell A1 I have the formula ='D:My
Documents\[test.xls]Sheet1'!D18
which gives as result "18". Can I display in cell A2 the text "D:My
Documents\[test.xls]Sheet1'!D18" somehow?

Arjan





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

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