Returning the formula in another cell

  • Thread starter Thread starter gelert
  • Start date Start date
G

gelert

Is there a way (without using VBA) to return the (string) formula of
another cell? Something like "=formula(A1)" ... which would return
whatever the formula is in A1, as a string??
 
If it is difficult in Excel, remember that in VBA it is as simple as:

Function foormula(s As Range) As String
foormula = s.formula
End Function

(oo on purpose)
 
Is there a way (without using VBA) to return the (string) formula of
another cell? Something like "=formula(A1)" ... which would return
whatever the formula is in A1, as a string??

Well there is, but there are potential problems with it in versions of Excel
prior to 2002. As in you can completely crash Excel under certain
circumstances. VBA would be safer and easier. However:

Select B1, or whatever cell you wish to see the formula.

Insert/Name/Define
Names in workbook: Formula
Refers to: =GET.CELL(6,Sheet1!A1)

Then in B2, type: =Formula

And it will always show the formula in the cell to the left.


--ron
 

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