how to build a formula from a string of text

D

DR

I want to build a dynamic formula from values from different fields and be
ale to execute it as a formula. I'm able to get the value in a cell as
"=A1+A2" but not the result.
Any guss on how I can do that without using Copy + Past Special/Value and
then replace = sign .... function?
 
C

Conan Kelly

DR,

Use the indirect function:

=INDIRECT("A1+A2")

If you have "=A1+A2" as text in cell A3, then put this as your formula in
cell A4:

=INDIRECT(A3)

But when you use INDIRECT, I don't think it likes the first charcter of the
formula to be an equals sign. Look up INDIRECT() in XL's help to be sure.
If your formula string is "built" by other formulas, then do away with the
"=", or you could use this as your formula in A4

=INDIRECT(RIGHT(A3,LEN(A3)-1))

HTH,

Conan
 
Top