Referencing A Formula As Text

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
 
G

Gjones

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
 
B

Bernie Deitrick

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
 
Top