Hi all,
Not sure if this is best done via excel solver, formula, or VBA, but I have the below problem:
A cell setting a maximum size, set in this example to '25'.
A set of numbers, which cannot be split, only combined, to fit into groups equaling 25, e.g.:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Size:[/TD]
[/TR]
[TR]
[TD]10[/TD]
[/TR]
[TR]
[TD]11[/TD]
[/TR]
[TR]
[TD]15[/TD]
[/TR]
[TR]
[TD]14[/TD]
[/TR]
[TR]
[TD]7[/TD]
[/TR]
[TR]
[TD]17[/TD]
[/TR]
</tbody>[/TABLE]
In this case I'd like the numbers to be sorted into groups where they fit into 25 as best as possible, the desired set would be below:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Size[/TD]
[/TR]
[TR]
[TD="class: xl68"]10[/TD]
[/TR]
[TR]
[TD="class: xl68"]15 [/TD]
[/TR]
[TR]
[TD="class: xl67"]11[/TD]
[/TR]
[TR]
[TD="class: xl67"]14[/TD]
[/TR]
[TR]
[TD="class: xl68"]7[/TD]
[/TR]
[TR]
[TD="class: xl68"]17[/TD]
[/TR]
</tbody>[/TABLE]
The top two rows = 25, as do rows 3 and 4, finally rows 5 and 6 equal 24. It is important that the numbers do not go over 25, but can be below, as long as they're the most efficient combination to do so.
If I have a list of say 100 numbers, the objective is to minimise the amount of times I have to divide them by 25, to have as few denominators as possible.
I am really unsure how to approach this one, any help would be greatly appreciated, thank you!!
Not sure if this is best done via excel solver, formula, or VBA, but I have the below problem:
A cell setting a maximum size, set in this example to '25'.
A set of numbers, which cannot be split, only combined, to fit into groups equaling 25, e.g.:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Size:[/TD]
[/TR]
[TR]
[TD]10[/TD]
[/TR]
[TR]
[TD]11[/TD]
[/TR]
[TR]
[TD]15[/TD]
[/TR]
[TR]
[TD]14[/TD]
[/TR]
[TR]
[TD]7[/TD]
[/TR]
[TR]
[TD]17[/TD]
[/TR]
</tbody>[/TABLE]
In this case I'd like the numbers to be sorted into groups where they fit into 25 as best as possible, the desired set would be below:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Size[/TD]
[/TR]
[TR]
[TD="class: xl68"]10[/TD]
[/TR]
[TR]
[TD="class: xl68"]15 [/TD]
[/TR]
[TR]
[TD="class: xl67"]11[/TD]
[/TR]
[TR]
[TD="class: xl67"]14[/TD]
[/TR]
[TR]
[TD="class: xl68"]7[/TD]
[/TR]
[TR]
[TD="class: xl68"]17[/TD]
[/TR]
</tbody>[/TABLE]
The top two rows = 25, as do rows 3 and 4, finally rows 5 and 6 equal 24. It is important that the numbers do not go over 25, but can be below, as long as they're the most efficient combination to do so.
If I have a list of say 100 numbers, the objective is to minimise the amount of times I have to divide them by 25, to have as few denominators as possible.
I am really unsure how to approach this one, any help would be greatly appreciated, thank you!!