View Single Post
  #5   Report Post  
Bill Martin
 
Posts: n/a
Default

I guess that it is not possible to find all combinations thet add up to the
given value? Also not by means of VBA?


It entirely depends how big your column of numbers is. If you have 10
numbers for example, then there are 2^10 = 1024 potential solutions to
exhaustively check. That's a small enough number to do easily with some
programming.

If you have 100 numbers in the column you're looking at a number of solutions
like 1 followed by 30 zeros. That's a serious problem to try to solve
exhaustively on a PC. Theoretically doable if you devote a PC to it full
time for much longer than you'd be willing to do.

If you have 1000 numbers forget any possibility of an exhaustive search.

With some clever programming you could probably speed up the search for
solutions by a factor of 10 or 100, but that's an insignificant improvement
for large columns of numbers.


Bill -- (Remove KILLSPAM from my address to use it)