Here are two brain teaser type questions that I came across today and I thought I’d demonstrate how you might use SOLVER to find the answers.

1 You have two pencils, a good one and a cheap one. The good one costs $1.00 more than the cheap one. You spend $1.10 for both. How much did the cheap one cost?

2 A farmer goes to the market with £100. He has to buy EXACTLY 100 animals and must spend the whole £100. He must buy at least one of each available animal. The animals for sale that day were

COWS £10 each

PIGS £3 each

CHICKENS £0.50 each

How many of each animal did the farmer buy?

The **answers** are

1 The expensive pencil costs £1.05 and the cheap pencil costs £0.05

2 The farmer must buy 5 cows for £50, 1 pig for £1 and 94 chickens for £47, giving a total of £100.

**Workings**

For **problem one**, work through the screen shots below to apply the SOLVER add in to these brain teasers. Do notice that in each case we are trying to find a specific value and not a maximum or minimum amount.

The target cell the total total cost in this case, contains an =SUM() formula that adds together the total cost for each of the pencils. The total total cost must exactly equal £1.10.

The total cost column, apart from its total, must have formulas in them too: number of pencils * cost each … of course we do not NEED the number of pencils column but I have included them in case you want to extend the example.

The SOLVER dialogue box for this problem follows:

The range for this problem starts in cell E7 with a blank cell!

For **problem two**, consider the following two screenshots: consider where I have used formulas and what those formulas must be, apart from the formula that the target cell MUST contain. Which is the target cell, too, by the way?

The range for this problem starts in cell A2 with a blank cell!

Need help? Just add a comment and I will see it and then respond.

Duncan Williamson

### Like this:

Like Loading...

06 07 2012 at 12:40 am

I admired your helpful article. awesome stuff. I hope you release others. I will continue watching

02 06 2018 at 6:05 am

Thank you … it is 6 years since you posted that comment and I hope you have not been disappointed in the materials I put here.

Duncan

16 05 2018 at 1:26 pm

7128=2 9352=1 8954=2 0894=4 2173=0 9496=? Work out ?

02 06 2018 at 6:03 am

Sorry for taking so long to reply Ric but here are my thoughts.

In terms of a SOLVER style problem, you need to say what you are maximising or minimising or the value you are trying to obtain. My exampls illustrate such situations. So you need profit per unit to help to maximise or cost per unit to minimise etc

Alternatively, I put your data on a graph and having done so would ask you to check your data because there is a POSSIBILITY that you made a mistake. Can you check the value associated with 9352? Currently you say 9352 = 1 but that looks wrong on my graph.

Of course, I have no idea what your data are or what they are saying so you update here will help a great deal.

Duncan