ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need help with formula (https://www.excelbanter.com/excel-programming/306633-need-help-formula.html)

deb

Need help with formula
 
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.

Bernie Deitrick

Need help with formula
 
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

"Deb" wrote in message
...
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.




Brett[_4_]

Need help with formula
 
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.

-----Original Message-----
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.
.


JBoulton[_2_]

Need help with formula
 
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

--
Message posted from http://www.ExcelForum.com


Bernie Deitrick

Need help with formula
 
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

"JBoulton " wrote in message
...
Bernie,

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

TIA,
Jim


---
Message posted from http://www.ExcelForum.com/




JBoulton[_3_]

Need help with formula
 
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.

The name of my business is BuildersTrust.

TIA<

Ji

--
Message posted from
http://www.ExcelForum.com


Bernie Deitrick

Need help with formula
 
Jim,

Those are the joys of the Excel Forum, an entirely superfluous layer that
you don't really need. You can access these newsgroups through any
newsreader - a lot of people use Outlook Express. For instructions, see

http://www.mvps.org/dmcritchie/ie/oe6nws01.htm

HTH,
Bernie
MS Excel MVP

"JBoulton " wrote in message
...
Bernie,

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

Anyway, please send me your code.

The name of my business is BuildersTrust.

TIA<

Jim





All times are GMT +1. The time now is 07:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com