Simple calculating ...

R

Robert

Hi
I am newbie with Excel, and can not find how to calculate this:

A B
2+3 5

ie. I will enter 2+3 (into A) , and B need to display 5.
If I write =SUM(A1) into B cell, I become 0.

Thank you
 
J

JMay

All (mathematical) calculations IN CELLS of Excel begin with the "="
character (without the Quote marks).

So with cell A1 the current cell enter: =2+3 (and press the enter
key)

A1 should now display the results, which is 5.

In cell B1 enter =A1 (and press enter) B1 Should now display 5
since
A1 = 5.

Does this help?
 
R

Robert

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.

Thank you
 
G

Gord Dibben

Toppers

I think you forget something................

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


Gord Dibben MS Excel MVP
 
T

Teethless mama

EVAL function give me an error #NAME? Excel stand alone won't reqconize this
function unless you have some kind add in more functions to your Excel. Am I
correct?
 
R

Robert

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?
 
G

Gord Dibben

Robert

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


Gord
 
R

Robert

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

Thank you
Robert
 
G

Gord Dibben

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 Insert>Module. 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
 
Top