# Solving algebraic problems without algebra using Excel

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.)

Source

-

## migrated from math.stackexchange.comJun 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

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:

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

You should get this after clicking OK:

-
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.

-

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.

-