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

How would you solve a problem of this type using Microsoft Excel?

A bat and ball cost a dollar and ten cents. 
The bat costs a dollar more than the ball. 
How much does the ball cost?

(The answer is that the bat costs $1.05 and the ball costs $0.05.)


share|improve this question

migrated from Jun 14 '12 at 12:07

This question came from our site for people studying math at any level and professionals in related fields.

Why on earth would you use Excel for that? – Hans Lundmark Jun 14 '12 at 11:41
Perhaps a more pertinent question is "Why would you work it out in MS Excel?" – Peter Taylor Jun 14 '12 at 11:42
@ Hans Lundmark, Why not? – oshirowanen Jun 14 '12 at 11:42
I'm reopening this... it seems like an odd (not-a-real) question but Kaze wrote a great answer about goal seek so with some editing I think it can be salvaged – Joel Spolsky Jun 15 '12 at 2:58
I think it's a really good question-the specific example is easy, but the concept has quite a bit of potential for solving complex problems. I often try and simplify examples to make sure they work before applying them to real-world complexities. – dav Jun 15 '12 at 13:40
up vote 5 down vote accepted

Another way using Goal Seek:

Enter the formula for the price of a bat in one cell (BALL_PRICE + 1.00), and the total in another (BALL_PRICE + BAT_PRICE). In my example below, A2 contains the formula for the price of a bat, and C2 contains the total:

enter image description here

Open Data > What-If Analysis > Goal Seek and set it up this way:

enter image description here

You should get this after clicking OK:

enter image description here

share|improve this answer
This is a nice, easy solution that doesn't require you to do the algebra by hand first (which was the best I could figure). – dav Jun 15 '12 at 13:39

Bat price 1

Ball price 0.1 (=1.1 - bat price)

Difference 0.9 (=bat price - ball price)

Error 0.1 (=1.0-difference)

Now use goal seek to set error to 0 by changing bat price.

share|improve this answer

As @Hans said, there's no need for Excel here. Let x be the price of the bat and y be the price of the ball. Since the two together cost $1.10 we have (in cents) x + y = 110. Since the bat costs a dollar more than the ball, we have x = y + 100.

The second equation allows us to replace x in the first, so (x) + y = 110 becomes (y + 100) + y = 110 so we find 2_y_ + 100 = 110 and subtracting 100 from both sides gives 2y = 10 so y = 5 so the ball costs 5 cents and hence, since the two prices total 110 we find that the bat must cost 105.

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.