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


Let's say A1:A20 is your data. Do the following:

B1:B20 = 0
C1:C20 = SUMPRODUCT(A1:A20,B1:B20)
C21 = SUM(C1:C20)

In Solver, target cell is C21 equals to value of <your target value by
changing cells B1:B20. There should also be another window that reads
"Subject to the contraints". In here add a constraint B1:B20 = binary.
This limit B1:B20 to be either 1 or 0. Run solver.

Here is the catch, if some numbers you know they can appear more than
once, those numbers need to appear more than once in your data (ie.
A1:A20 in the above example). Another catch is that there may be more
than one combination that yields the same target value and solver will
not give you all the results.


Hope it helps




Stephen Wrote:
Hi Morrigan
Just wanted to confirm that you understand what I'm trying to achieve
here.
I'm not the best at explaining myself and what I need..

I've got several cells, sometimes hundreds, and only a few of these
cells
add up to the value that I'm given. My problem is finding these
particular
cells that add-up to equal my value... The cells could also be
duplicated..

Your solution below might be what I'm looking for, but I'm not sure I
know
how it works..

Thanks for your patience. Stephen



--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=387543