Add #'s in one cell...Solution in other cell

J

Juan

Hello,

I'm trying to get the sum of two numbers in one cell to
show up in another cell. For example...

In cell A1 I have written, 1+2. Now, in cell B1 I need
the solution, 3, to show up automatically. How can this
be done?

Thanks for your help!
 
G

Gord Dibben

Juan

A user defined function is required for this.

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

usage: assuming 1+2 in A1........in B1 enter =EvalCell(A1)

I think you are setting yourself up for future problems using this method.

How about entering 1 in A1 and 2 in B1 and =A1+B1 in C1

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top