Need help with formula

D

Deb

I have a column of numbers that I need to find only a
subset that adds up to a specific value. Is there a
formula to do this? Ex: A1 through A1 thru A24 equals
3899 but I need to find only 5 fields that add up to 640.
 
B

Bernie Deitrick

Deb,

I will send you a workbook that has a macro that can do that.

Send me an email - take the space out and change the dot to a .

HTH,
Bernie
MS Excel MVP
 
B

Brett

There is not a specific formula to do this that I am aware
of. It sounds like you would have to write a routine. It
wouldn't be too bad, but would consist of quite a few
nested Do loops (at least in my limited knowledge). And
depending on the complexity, it most likely would return
only one subset that equals the target sum, even if
multiple subsets would satisfy the goal.
 
J

JBoulton

Bernie,

I would love to see that code, too. I'd send an e-mail, but can't see
to find your address...

TIA,
Ji
 
B

Bernie Deitrick

Jim,

Take out the spaces and change the dot to a . and you'll have my correct
email address. Otherwise, post yours here, and I will send along the
example.

HTH,
Bernie
MS Excel MVP
 
J

JBoulton

Bernie,

"Take out the spaces and change the dot to a . and you'll have m
correct email address. " I understand the instructions, but I don'
have a clue where to look for the text to apply the instructions to...

Anyway, please send me your code. [email protected]

The name of my business is BuildersTrust.

TIA<

Ji
 
Top