> I'm going to look deeper into Solver.
Just something to keep in mind for this particular type of problem.
To reduce the size of the Solver problem, I might use half the weights also.
wgts = {1, 1, 1, 1, 2, 2, 2, 10, 10, 20}
Note that many totals have more than 1 solution. For example, if I want 14
(total weight 28), then there are 3 solutions that total 14:
{14, {2, 2, 10}},
{14, {1, 1, 2, 10}},
{14, {1, 1, 1, 1, 10}}
My guess is that one would prefer the "Least" amount of weights to add.
If this is a requirement, then Solver becomes a little harder to use as it
requires mulitple loops.
For small problems like this, finding all the subsets of the above list
might be another option. For each total, pick the one with the least amout
of weights.
For example, for 20, pick
{10, 10},
instead of
{1, 1, 1, 1, 2, 2, 2, 10}
Note that with the numbers {1, 1, 1, 1, 2, 2, 2} summing to 10, then all
numbers between 1 and 50 can be included.
--
Dana DeLouis
"nLinked" <(E-Mail Removed)> wrote in message
news:33E8D075-7C7B-4D06-87DE-(E-Mail Removed)...
> Thanks that does work! All I need to specify is half the weight that I'll
> need, let it solve it, and then I know I need these plates on one side,
> and the same amount on the other. I'm going to look deeper into Solver.
>
> Many thanks!
>
> "Gary''s Student" <(E-Mail Removed)> wrote in
> message news:A0503BEA-C24C-4962-AFFA-(E-Mail Removed)...
>> Start by listing the individual weights in a column:
>> 10
>> 10
>> 10
>> 2
>> 2
>> 2
>> 2
>> 2
>> 2
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 20
>> 20
>>
>> Then you can use Solver to pick a subset that sums to a desired total.
>> See:
>>
>> http://www.tushar-mehta.com/excel/te...olver_Template
>>
>> --
>> Gary''s Student - gsnu200766
>>
>>
>> "nLinked" wrote:
>>
>>> Lets say I have the following weight plates for my home gym:
>>>
>>> 4x 10 kg
>>> 6x 2 kg
>>> 8x 1kg
>>> 2x 20 kg
>>>
>>> I want to make a calculator in Excel where I say I want a total of 12 kg
>>> (for example), and it automatically assigns the available plates for
>>> each
>>> side of my weight lifting bar (so 6 kg per side).
>>>
>>> It has to consider that I only have those available plates. And if it
>>> can't
>>> find a perfect match, it has to find the nearest weight.
>>>
>>> Any ways this can be done in Excel?
>>>
>>> Yes, I know it's easy so work out the weights on your own but I have a
>>> lot
>>> more weights than that and it would be quite helpful to plan my
>>> periodization routine more quickly. I'm sure it could come in helpful
>>> for
>>> others too.
>>>