View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default how many combinations in a list equal a certain total

There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly larger
then 2^23) In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of rows
you need to examine. (so in your example, any solution that contains a B
could be another solution by replacing B with F)

Regards,
Tom Ogilvy


"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is cost. I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie