Hi,
I'm looking for an algorithm that can calculate all possible combinations from a list of numbers that fits a target number. For example:
The numbers are stored in column A. Each number has price stores in column B.
## A B
1 1 9$
2 5 12$
3 2 4$
4 3 3$
5 4 2$
6 7 5$
Target Value: 10
Required answers: 2*A2 or A1+A2+A5 or 5*A3 or 2*A5+A3 and so on...
Than, it should chose the profitable combination. For example:
2*A2 24$
A1+A2+A5 23$
5*A3 20$
2*A5+A3 8$
Therefore, 2*A5+A3 is the profitable combination...
I'd be grateful to your help!!!
Thanks,
Oren
orenw8,
Welcome to the Excel Forum.
See:
Find multiple combinations in a list that adds up to a certain value?
http://www.tushar-mehta.com/excel/te...e_combinations
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks