Referencing A Formula As Text

  • Thread starter Thread starter abc
  • Start date Start date
A

abc

Hi,

I am working on a problem to parse and manipulate parts of a formula i
one cell from another cell. In the second cell I will be carrying ou
some VBA & Logical functions. Is there any way I can get a formula i
one cell to reference a formula in another cell as text.

Thanks
 
Hi ABC;

you can go into VBA and use the Formula method to get the
string. Then you can do the manipulation and put the
desired formula in the cell you choose.

MyCurrentFormula = Range("A1").Formula

Might return =SUM(B3:C3)

Thanks,

Greg
 
You need to use a user-defined-function

Function CellFunc(inCell As Range) As String
CellFunc = inCell.Formula
End Function

Used like

=CellFunc(A1)

HTH,
Bernie
MS Excel MVP
 

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