View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default evaluating text as if it were a formula

Perhaps you had a UDF in the past.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

=EvalCell(A1) with 2+1/4 in A1 returns 2.25


Gord Dibben MS Excel MVP


On Thu, 31 Jan 2008 02:24:01 -0800, Peter Facey
wrote:

Suppose I have text in cell A3 such as "2+1/4". I want Excel 2003 to evaluate
that as a formula and put the resulting value - namely 2.25 - in another
cell. Can it do this?

I have a vague memory, perhaps of another spread sheet, that one could
say =EVAL(A3), but Excel doesn't seem to have the capability.