VAB or Formula, subset SUM problem

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
387
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
hi all, anyone know this algoithm?

i have this problem:

have this subset: (5,13,9,12,22,50,18) (A1,B1,C1,D1,E1,F1,G1)
and in A2, have this number: 36

How to determine wich elements of the set of numbers sum 36 in this case is: 13+18+5

Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
A way to do
Assuming data in row 1 from A to G
Put 0 in row 2 from A to G
In H3 put =SUMPRODUCT(A1:G1*A2:G2)

Call (or install first) the solver
Set target H3
Equal to your value 36
by changing cells A2:G2
Subject to the Constraints
A2:G2 = binary
Add
OK
 
Upvote 0
oooo solved with solver......

give me 5,13,18 (in this order)

https://imgur.com/a/ooy3k

dude: why do this result: 5,13,18

and not:

5,9,22 ? or exist other way for get more results?

thanks
 
Upvote 0
other q:

a friend say: sumMatch can do this work..


i am checking this way too..

thanks
 
Upvote 0
Excel stops when one possibiliy is found, if you change the daata order result will change
If you want all possibilties it is another story and need a macro .
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top