excel - How to display number as text but allow use in calculation? -


i'm using data make notes of things. need content of cell display 3+2; goes in table , i'd sum equal 5.

e.g.

name jan feb aaa 4 3+5 bbb 4+2 3+3 ccc 2 4 total 12 18

would possible @ all?

you can create simple function in vba can evaluate expressions:

function eval(expression) string     eval = evaluate("" & expression) end function 

then in cell can use formula this:

 =eval(c2)  // c2 value 3+2  =eval(3+2) // or directly 

example:

enter image description here

you can use expression 3+2 in cell want show , use eval function in table want show value of expression.

code screenshot:

enter image description here


Comments