Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A1=5 A2=+ A3=5 B1=23 B2=/ B3=3 ... ...

In column 4, I need to execute the 5 + 5, 23 / 3, etc.. automatically. The operand changes though. I have about 50K math problems that I need to evaluate. So how do I use the symbol in column 2 to actually perform that given problem.

share|improve this question
up vote 4 down vote accepted

@Tom Collins's solution is great, but if you wanted to use just Excel and no VBA, you can use an EVALUATE function in Excel, but not in the way you would expect. It's not a regular worksheet function.

You'll need two helper columns, one to contain the concatenated formula, and one to display the final result.

In D1 you'd have


This will compress the separate formula pieces into one cell. You then need a range name to convert it into an evaluated format.

On Excel 2007 / 2010, go the Formulas tab and Define Name. In name you can use Answer, and in Refers To enter the formula


Then in E1, you can enter


and drag down.

share|improve this answer

Excel has an Evaluate function in VBA. You can use a function like the one below to pass the cell values to it.

Function Eval(R As Range)
   Dim S As String
   Dim C As Range
   For Each C In R.Cells
      S = S & C.Value
   Eval = Evaluate(S)
End Function

So, in A4 you'll have =Eval(A1:A3)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.