View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Simple calculating ...

If you look at my first post you will see this User Defined Function(UDF)

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

usage is..........=Eval(cellref)

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there.

Save the workbook and hit ALT + Q to return to Excel window.

Enter the formula in a helper cell as explained above.

i.e. 2+3 in A1.................=Eval(A1) in B1 returns 5

Can be any math operators like 12/3*5+12 reurns 32

10^3 returns 1000


Gord

On Sat, 28 Apr 2007 19:30:12 +0200, "Robert" wrote:


Gord
sorry, but I am a newbie, a big one.
Can you be a little more specific?
What is UDF?

Thank you
Robert


Robert

Copy the Eval UDF to a general module in your workbook then use Toppers
formula.


Gord

On Sat, 28 Apr 2007 18:45:40 +0200, "Robert"
wrote:


Hi
thank you for your mail, but this is not what I need.
I know for "=" and know how to become 5 (from 2+3)
I do not know how to calculate this:

A B
2+3 5

When I enter 2+3 into A cell, cell B need to display 5, not cell A.

Cell A must look's like this:

2+3 (not 5, but 2+3)
and cell B
5

Maybe I am not clear enough?