View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Converting text to formulas

See Evaluate Method in Excel Help!

Regards,
Stefi


€˛Eutrapelia€¯ ezt Ć*rta:

I tried using that, but it still only returns a text string, at least with
the way that I am using it.

"Tieske" wrote:

try using INDIRECT()

Tieske

"Eutrapelia" wrote in message
...
I am trying to streamline a mathematical optimization program that I wrote
in
Excel with a macro. Say that I have typed a formula into cell A1 as a
text
string, such as "x^2+10*x^4". Next I have renamed cell B5 as "x". I want
the cell C5 to convert the formula written as a text in A1 to the formula
"=x^2 +10*x^4" which will reference cell B5 and calculate it without
having
to manually copy in the equation from A1.

I tried the Visual Basic Range.Formula= function but this only returns a
text. Substitute() and Text() do not seem to work either. Does anyone
know
how to do this?