search an array for possibilities

  • Thread starter Thread starter Kate
  • Start date Start date
K

Kate

I have a column with totals in it (numbers). From this array of numbers I
want to search for any combination by (adding these numbers together) that
will equal a number in another cell say B3.

Another way to say this is: in Column A I have in each row a number. In
cell B3 I have the number I am looking for, which could be any combination of
adding the numbers from Column A. Is their a way I can search column A and
come up with a combination that will equal what I am searching for in Cell B3?

Column A Column B
1
2
3 26
4
5
6
7
8
9
....
 
Here's a method using the solver add-in, otherwise you would need VBA


http://tinyurl.com/yqnogr


mind you that the solver that comes with excel is limited to how much number
crunching it can do


--


Regards,


Peo Sjoblom
 
I think I may be limited by the excel problem solver as I have 2903 lines and
am looking for a 2,000,000 + total, and am getting a binary constraint must
only contain adjustable cells warning. Any thoughts?
 
Kate,

That is too many possibilities - Excel starts bogging down at around 30-40 or so. And there are
probably a huge number of ways that 2903 items could be combined to come up with a specific value.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top