Hi All!
I have a table as shown below, and I need a solution (Excel macro) how to find all combinations of Values that when summed equal to Sum Needed
<tbody>
</tbody>Sum Needed: 1000
So, here 1000 can be reached in 3 ways:
1: Name2 + Name3 + Name5
2: Name1 + Name4 + Name5
3: Name1 + Name2 + Name3 + Name4
Value can be either used (full amount added) or not. So, only binary options (1 or 0) for each of values.
Also, in case no combination is found, a message should be provided.
How to do it?
Thanks!
I have a table as shown below, and I need a solution (Excel macro) how to find all combinations of Values that when summed equal to Sum Needed
Names: | Values: |
Name1 | 100 |
Name2 | 200 |
Name3 | 300 |
Name4 | 400 |
Name5 | 500 |
<tbody>
</tbody>
So, here 1000 can be reached in 3 ways:
1: Name2 + Name3 + Name5
2: Name1 + Name4 + Name5
3: Name1 + Name2 + Name3 + Name4
Value can be either used (full amount added) or not. So, only binary options (1 or 0) for each of values.
Also, in case no combination is found, a message should be provided.
How to do it?
Thanks!