Forum Discussion
mcinqb3
Mar 16, 2024Copper Contributor
How to find which combination of multiples of a set of 5 numbers will return a given value
Hi all. New to excel, but decent using spreadsheets for trivial things. Right now, I'm trying to figure out which combinations of a set of 5 numbers or their multiples will give me a sum of AT LE...
PeterBartholomew1
Mar 17, 2024Silver Contributor
I think Solver is the way to go.
The method is Simplex LP (linear programming).
The integer multipliers x are the optimisation variables.
The objective function is basically the sum of x but I have added a small proportion of the constraint exceedance to act as a tiebreaker.
The main constraint is on g=SUM(a*g) which must exceed the target.
The figure shows the solution returned by Solver.