Displaying in a cell the formula from another cell

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

Guest

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
 
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
(e-mail address removed)
 

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