Function to display formula in specified cell

  • Thread starter Robert E. Leonard Sr
  • Start date
R

Robert E. Leonard Sr

I am trying to display in a spreadsheet, the formula in an adjent cell. Any
suggestions?

EXAMPLE:

cell A2 contain formula: =Mid(c3,5.2)

In cell B2 i would like to insert a formula displaying above formula.

I know that I can copy the formula to cell B2 and save as text by inserting
a space before = sign. What I am looking for is an automatic fix.

Thanks, for your help
Bob Leonard
(e-mail address removed)
 
B

Bernard Liengme

Here is the UDF I use for documention
Function ShowFormula(MyCell)
ShowFormula = MyCell.Address & " " & MyCell.Formula
End Function
best wishes
 

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

Top