Hello,
Is there a method/formula,function that would calculate the minimum numbers to add to a row range to equal a certain target value?
For example:
Say I have a ten cell range A1:A10.
I have a target value of 15.
I need the solution to fill as many cells, starting from A1, as it can with 1's and then switch to 2's and 3's and so on, with the goal of achieving the target number with the smallest number values.
So, the desired result would be:
A1=1
Once the number increases it cannot decrease again.
Another example with target number of 17:
Thank you!
B
Is there a method/formula,function that would calculate the minimum numbers to add to a row range to equal a certain target value?
For example:
Say I have a ten cell range A1:A10.
I have a target value of 15.
I need the solution to fill as many cells, starting from A1, as it can with 1's and then switch to 2's and 3's and so on, with the goal of achieving the target number with the smallest number values.
So, the desired result would be:
A1=1
A2=1
</strike>
The sum of all the cells equals 15, but uses the lowest numbers possible to achieve it.A3=1
A4=1
A5=1
A6=2
A7=2
A8=2
A9=2
A10=2
<strike>A4=1
A5=1
A6=2
A7=2
A8=2
A9=2
A10=2
</strike>
Once the number increases it cannot decrease again.
Another example with target number of 17:
A1=1
A2=1
A2=1
A3=1
A4=1
A5=1
A6=2
A7=2
A8=2
A9=3
A10=3
A4=1
A5=1
A6=2
A7=2
A8=2
A9=3
A10=3
Thank you!
B