Convert a plus sign(or minus, mulitply and divide) in text format to operator.

dominofly

New Member
Joined
May 26, 2010
Messages
31
Hi All,

I need a little help please. Iv been racking my brain on this for a few hours now and still not able to get a workable solution.

Basically i have 3 cells in a row. a number in the first cell, in the second a + or - or, etc, and in the third i have another number. The problem is the cell containing the operator is in text format. Question is how do i convert that to back to an operator when i use all these cells in a formula. eg

5 + 5 = 10(this is where i would create my formula).

PS: i know to convert a number to a date it would be CDate(cell ref with number). Is there something like this that can work?

Thanks in advance!!
D
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
If you're happy using a UDF...

Code:
Function Eval(rng1 As Range, rng2 As Range, rng3 As Range)
    Eval = Evaluate(rng1 & rng2 & rng3)
End Function

Code:
=Eval(A1,B1,C1)
 
Upvote 0
thanks Neil!

I already know how to code it that way. Do you or anyone else know of a function that can do this without having to use VB script?

Thanks in advance!

D
 
Upvote 0
Define a name, say MyCalc, as:
=EVALUATE(Sheet1!$A$1&Sheet1!$B$1&Sheet1!$C$1)
and enter =MyCalc in the result cell. Then fill in the three referenced cells as needed.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,683
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top