Hello, I have been struggling finding subset(combination) of given nubmers that is closest to a target sum.(but exceeds the target number)
Please see the example below.
Candidates of numbers(which varies everytime) : {1.8 , 1.9 , 1.7 , 9.5 , 9.6 , 9.4 , 9.5 , 9.6 , 18.7 , 18.7 , 18.6 , 17.7}
Target sum(given sum) : 53
I want to find out combination of numbers which is closest to 53 (but exceed 53) in Excel.
I have been trying to find a vba algorithm to solve this kind of problem, but couldn't find one which exactly fit into mine.(most of them were in C++, Python, Java..)
I would really appreciate it if you could help me with this matter.
Thank you so much, in advance !
Please see the example below.
Candidates of numbers(which varies everytime) : {1.8 , 1.9 , 1.7 , 9.5 , 9.6 , 9.4 , 9.5 , 9.6 , 18.7 , 18.7 , 18.6 , 17.7}
Target sum(given sum) : 53
I want to find out combination of numbers which is closest to 53 (but exceed 53) in Excel.
I have been trying to find a vba algorithm to solve this kind of problem, but couldn't find one which exactly fit into mine.(most of them were in C++, Python, Java..)
I would really appreciate it if you could help me with this matter.
Thank you so much, in advance !