FINDING A COMBINATION FROM A LIST TO EQUAL ...

  • Thread starter Thread starter SBUMP2
  • Start date Start date
S

SBUMP2

I HAVE A LIST OF NUMBERS IN COLUMN A. I HAVE A NUMBER THAT IS EQUAL TO THE SUM
OF 2 OR MORE OF THE NUMBERS IN COLUMN A.

CAN I FORMULATE ANYTHING TO RETRIEVE THE COMBINATION?

A

2
3
7
13
19

I NEED TO FIND THE NUMBERS THAT EQUAL 35.

(e-mail address removed)
 
Previous post from Bob Umlas:-

If it's not too many cells involved, SOLVER can do this.
With the setup you describe, in C1 enter =A1*B1 and fill down to C5 (B1:B5
are blank)
in C6 put =SUM(C1:C5)
Use solver and set up the constraints for
Set Cell C6 to value 21 (for example);
B1:B5 are integers
B1:B5 >=0
B1:B5 <=1
Solve.
The cells in B1:B5 which become 1 are the corresponding items which will add
up to the desired result.
It works for longer values but courl take a long time!

Bob Umlas
Excel MVP
 
when i try to put in B1:B5 are integers, I get ... Integer constraint Cell
Reference must include only adjustable cells.

Any ideas.
 
In the dialog Box where it says 'by changing cells' you need to have put the
reference $B$1:$B$5

Without that you will get the message you have seen.
 
Back
Top