Combine to equal a given value

A

Angie

Is there a way to have Excel tell what values in a given
column can be combined to equal a given value? For
example...there are x number of rows in column B. Search
column B to determine a combination of values that will
equal $700?
 
K

Ken Wright

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
 

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

Top