Sam62
07-19-2009, 12:28 PM
Mdmackillop and P45cal were so nice to help me with my other problem, I thought I would try again.
I have a column of 400+ math equations in text format like these:
2+2=?
2+10=?
2 x 2=?
12 x 11=?
6 / 2=?
12 / 12 =?
6 - 4=?
3 - -4=?
12 / -3=?
I would like VBA routine that will go down a column M, evaluate the text and place the answer in col U. If if is possible, it might be nice to find the text to evaluate in a string of characters such as "What is the value of =14x14 in the chart?" I placed an equals sign to identify where the equation starts (maybe another way is better but also how to determine the last number to use in the equation?) I assume that spaces can be in or out between numbers and signs.
Although not needed for the above, I would not be disappointed if it could also handle one like this : "What is the value of this equation: (4+3)/2 -3x4?"
I have spent several hours searching for a simpler routine then the ones if found that were for "Complex Formulas" such as trig functions.
thanks
I have a column of 400+ math equations in text format like these:
2+2=?
2+10=?
2 x 2=?
12 x 11=?
6 / 2=?
12 / 12 =?
6 - 4=?
3 - -4=?
12 / -3=?
I would like VBA routine that will go down a column M, evaluate the text and place the answer in col U. If if is possible, it might be nice to find the text to evaluate in a string of characters such as "What is the value of =14x14 in the chart?" I placed an equals sign to identify where the equation starts (maybe another way is better but also how to determine the last number to use in the equation?) I assume that spaces can be in or out between numbers and signs.
Although not needed for the above, I would not be disappointed if it could also handle one like this : "What is the value of this equation: (4+3)/2 -3x4?"
I have spent several hours searching for a simpler routine then the ones if found that were for "Complex Formulas" such as trig functions.
thanks