chevronrod
asked on
convert text formula to its mathematical result
(Apologies if this has been answered. I couldn't find it, though.)
I have this arithmetic expression in TEXT format (for example): 8 + 6 - (-9). This is for a math worksheet. The student is to evaluate it (to 23, in this example). Currently I have to do the math myself and type in the answers (for an answer sheet).
Can I just copy and paste somehow so that Excel will take that TEXT expression and do the math for me and show the result in a cell. Can I do it without macros (functions are o.k.). I want to keep it simple.
I have this arithmetic expression in TEXT format (for example): 8 + 6 - (-9). This is for a math worksheet. The student is to evaluate it (to 23, in this example). Currently I have to do the math myself and type in the answers (for an answer sheet).
Can I just copy and paste somehow so that Excel will take that TEXT expression and do the math for me and show the result in a cell. Can I do it without macros (functions are o.k.). I want to keep it simple.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A few small caveats with Brad's solution: You see an equal sign in the printed equation, the formatting can get a little dicey as Excel expands the column widths by a percentage when showing formula view, and ALL formulas on the sheet will be displayed, even those you that you DON'T what to be displayed as formulas.
Kevin
Kevin
also have a look at here : http://www.freevbcode.com/ShowCode.asp?ID=1048
HainKurt,
I'd have sworn that the user-defined function in that freevbcode.com link wasn't going to work in a worksheet formula--but I would have been wrong. It may be slow and inefficient to launch a new instance of Excel to evaluate the formula in a single cell, but it does work in Excel 2003.
Brad
I'd have sworn that the user-defined function in that freevbcode.com link wasn't going to work in a worksheet formula--but I would have been wrong. It may be slow and inefficient to launch a new instance of Excel to evaluate the formula in a single cell, but it does work in Excel 2003.
Brad
But, seriously, why would you want to fire up an Excel instance to run a function that you can run in the parent instance without any adverse affects?
ASKER
Awarded it to both. The function is a good idea and I like it a lot. But my company locks out any macros on Excel sheets. I might be able to get an exception for the one I'm making.
The ~ solution is a great time saver as well (especially in the meantime).
So I've awarded both experts on this one.
The ~ solution is a great time saver as well (especially in the meantime).
So I've awarded both experts on this one.
Do you need a more automated solution?
Kevin