Combination Locator


I need a help please!

I want to come up with macros or excel formula that will trace/locate combinations

equivalent to a inputted amount or number



Selected Answer

In order to "come up" with such macros or formulas you need to take two steps. The first is to work out how the calculation should be done. The second is to write code or formulas to carry out your plan.

On step One, it is obvious that the number of possible combinations depends upon both the input amount, the number of listed amounts and their values. The possibilities range from zero to astronomical.

The method must be to take each number and try to create the input amount by matching it with a combination of each of the other numbers until the total matches or exceeds the input amount. Now, I am not making this plan - you are - but isn't it true that for the 16 amounts in your list the total number of possible combinations would be 16^15-1? How many days would it take your computer to go through so many calculations, if each one takes 1/1000th of a second? I arrive at the formula = (16^15-1)*0.001/86400 which gives a result of 13,343,998,896 days. Divide by 365 to create a result in years and Excel tells me it is 36,558,901.08 years. Are you sure you want to wait for the result?



Thank you for that advice. What if only one output, what should be done? 
jb_80 (rep: 2) Mar 29, '18 at 8:39 am
You need to loop through all possibilities in order to determine that there is none. Therefore, no difference.
Variatus (rep: 1755) Mar 29, '18 at 7:52 pm
Ok thanks
jb_80 (rep: 2) Mar 31, '18 at 9:26 pm
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login