View Single Post
  #11   Report Post  
Dave Peterson
 
Posts: n/a
Default

There's nothing built into excel that lets you do that.

But you could create a user defined function that did it.

Option Explicit
Function Eval(myStr As String) As Variant
Eval = Application.Evaluate(myStr)
End Function

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-R to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.

Then use a formula like:

=eval(A24)
if A24 contained the string to evaluate.



Deernad Construction wrote:

I am using Office 2000. I have an aritmetic problem that I want to display
in one cell and then have it total those numbers in a seperate cell. I need
it to be able to automatically change the total in cell A2 if I change a
number in cell A1 I can't figure out how.
Example of how I'd like it displayed:
[Cell A1] 1+2.5+3+4
[Cell A2] 10.5


--

Dave Peterson