Thread: COMBINAISON
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
...Patrick ...Patrick is offline
external usenet poster
 
Posts: 5
Default COMBINAISON

heu..........no if you have one :))
Thank you Tom
Patrick



"Tom Ogilvy" a écrit dans le message de
...
You only wanted one solution?
--
Regards,
Tom Ogilvy

...Patrick wrote in message
...
Thank you Myrna !!!
I try this

...Patrick

"Myrna Larson" a écrit dans le message de
...
Here's a message from 3 years ago that shows how to do this with Solver.

I modified it a
bit for
your problem.

On Fri, 10 Nov 2000 16:19:53 GMT, wrote:

Problem: You have numbers in A1:A5. You want to find a combination of

those
numbers whose sum is 100.

In B1:B5, put the number 1.

In B6, put the formula =SUMPRODUCT(A1:A5,B1:B5).

In B7, put the formula =COUNTIF(B1:B5,1)


Then use Solver.

The Target cell is B6
The goal is that B6 has a value of 100
The cells to change are B1:B5
The constraints a
B1:B5 must be "bin" (i.e. binary -- 1 or 0 -- which wasn't obvious to

me)
B7 must be = 1


Note that this will only find one combination; there may be more than

one.

On Fri, 7 Nov 2003 22:19:28 +0100, "...Patrick"

wrote:

Hi ! and sorry for my poor english....
I have a number like 100 in A1 and a little list of numbers in B1:Bxx

and i would like
to
find what numbers in B make a total equal to A1

ex:in B1:Bxx
50
2
6
44
12
9
17
23
20
45
40

in this case i have : 50+6+44 = 100 or 17+23+20+40= 100

Is it possible ?

Thanks a lot

...Patrick