View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default using Excel Solver

Put 1 in each cell in B1:B100
In C1 enter =SUMPRODUCT(A1:A100,B1:B100)
Solver:
Target C1; Value 22
By changing B1:B100
Constraint B1:B100 binary
Solve
There can be many answers, Solver gives one that depends on initial state
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Kenneth" wrote in message
...
From A1 to A100, i got value from 1 to 100 (A1 will be value 1, A2 will be
value 2 and so on).

how do i get excel solver to choose for me cells that can possibly add up
to
a value of 22?