Converting Concatenated Strings to Formulas

E

Ecnerlac

I use concatenation to construct formula that suit particular condition
in one cell. However, when I try to have the results automaticall
converted to a formula by way of a function in another cell I run int
a deadend as there is no appropriate function! I had to resort t
copying each cell, pasting values and then I would have to further hi
F9 to turn the formuals on.

Is there a shorter way
 
F

Frank Kabel

Hi
one way would be to use a UDF. Find below a quite simple
version

function eval_it(s_formula)
eval_it = application.evaluate("=" & s_formula)
end function

And use this in one of your cells.
e.g.
=EVAL_IT("A1+B1")
 
M

macropod

Hi Ecnerlac,

I suggest you check out the INDIRECT function, which can take text strings
from other cells and turn them into formulae.

Cheers
 
Top