View Single Post
  #9   Report Post  
Homeboy
 
Posts: n/a
Default

"Ron Rosenfeld" wrote:

If ANY solution is acceptable, and there is no need to resolve ambiguities
(which can exist even if all the numbers are unique), you could use Excel's
Solver to find a solution.

For example:
In A1:A60 enter your values.
In B1:B60 enter the number '1'
In C1 enter the formula: =SUMPRODUCT(A1:A60,B1:B60)

Tools/Solver
Set Target Cell: D1
Equal to: Value of: 112 (or whatever)
By Changing Cells:
B1:B60

Subject to the Constraints:
Add
Cell Reference: B1:B60
bin (in the dropdown box)
OK
Solve

Depending on the numbers, you may have to select Options and change the number
of iterations.

After you do the above, the cells adjacent to where B1:B60=1 will sum up to
your payment value.

If you don't see the Solver item on the Tools menu, you may have to add it at
the Tools/Addins and select Solver Addin.


Ron, you de man. You response was incredibly complete including being
proactive about the fact that the solver add-in might not have been
installed. (It wasn't.) This was exactly what I needed. I made one change
though. The solver thingie seem to want C1 rather than D1.

Thanks again.