Can solver do this?

C

chrisrowe_cr

Hi everyone, im new here. I have a reasonable knowlege of Excel, but my
question emphasises a gap in my knowledge!

ok, wondering if and how the solver function could achieve this:

list of numbers...

23
43
51
27
19
28

etc....

I want to find say for example the numbers that add upto 79 in that
list, can solver find which of the numbers ie 43+17+19 do so?
 
D

David Jessop

Hi,

Yes it can. Put the numbers you have in a column and add a column of zeros
next to them, and calculate =SUMPRODUCT () between the two. This becomes the
target cell for solver.

The cells to change are the columns of zeros and then you "just" have to add
the constraint that each of these is binary.

Finally, set solver to do Equal to Value of 79 in your example.

In this case I get the solution 51 + 28 btw!

HTH,

David
 
M

MrShorty

David's method works just fine for finding any solution. As David
hinted, you may need to add other constraints or definition to the
problem is you want to find a specific solution or find all possible
solutions.
 
Top