ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED NUMB (https://www.excelbanter.com/excel-programming/328812-what-combination-set-numbers-comes-closest-fixed-numb.html)

Red

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED NUMB
 
I HAVE A GROUP OF 14 TO 20 6 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST TO
100,000 WITHOUT GOING UNDER.


Bernie Deitrick

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED NUMB
 
Red,

It is impossible to add 6 digit numbers to get to 100,000, which is the
lowest possible 6 digit number. Perhaps you have mis-stated your problem.

(And, no need to type in CAPS - it's hard to read....)

HTH,
Bernie
MS Excel MVP


"RED" wrote in message
...
I HAVE A GROUP OF 14 TO 20 6 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST TO
100,000 WITHOUT GOING UNDER.




Tom Ogilvy

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED NUMB
 
Pick any single number and you have the answer. the lowest 6 digit number
you can have is 100,000. If you want the one closest to 100,000 then

=min(A1:A20)

--
Regards,
Tom Ogilvy



"RED" wrote in message
...
I HAVE A GROUP OF 14 TO 20 6 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST TO
100,000 WITHOUT GOING UNDER.




Red

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED
 


"Bernie Deitrick" wrote:

Red,

It is impossible to add 6 digit numbers to get to 100,000, which is the
lowest possible 6 digit number. Perhaps you have mis-stated your problem.

(And, no need to type in CAPS - it's hard to read....)

HTH,
Bernie
MS Excel MVP


"RED" wrote in message
...

Sorry my mistake i mean 5 digit.


I HAVE A GROUP OF 14 TO 20 5 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST TO
100,000 WITHOUT GOING UNDER.





Toppers

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED
 
Hi,

I modified a copy Myrna Larson's code (for permutations and combinations) to
calculate the nearest set of values to 100,000 for a subset of 6 five digit
numbers from a set of 20 randomly generated numbers.

Code can be found at the link below which was copied from a previous reply
by Tom Ogilvy to a posting on Combinations and Permutations ; if this link
fails, search on "Permutations and Combinations" in this NG to find Tom's
reply):

http://groups.google.com/groups?selm...&output=gplain

If you look at this and need the code changes (only a few lines) , then
repost.

HTH

"RED" wrote:



"Bernie Deitrick" wrote:

Red,

It is impossible to add 6 digit numbers to get to 100,000, which is the
lowest possible 6 digit number. Perhaps you have mis-stated your problem.

(And, no need to type in CAPS - it's hard to read....)

HTH,
Bernie
MS Excel MVP


"RED" wrote in message
...

Sorry my mistake i mean 5 digit.


I HAVE A GROUP OF 14 TO 20 5 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST TO
100,000 WITHOUT GOING UNDER.





Bernie Deitrick

WHAT COMBINATION OF A SET OF NUMBERS COMES CLOSEST TO A FIXED
 
Red,

Email me privately (take out the spaces and change the dot to . ) and I
will send you a workbook that will do what you want.

HTH,
Bernie
MS Excel MVP


"RED" wrote in message
...


"Bernie Deitrick" wrote:

Red,

It is impossible to add 6 digit numbers to get to 100,000, which is the
lowest possible 6 digit number. Perhaps you have mis-stated your

problem.

(And, no need to type in CAPS - it's hard to read....)

HTH,
Bernie
MS Excel MVP


"RED" wrote in message
...

Sorry my mistake i mean 5 digit.


I HAVE A GROUP OF 14 TO 20 5 DIGIT NUMBERS ALL POSITIVE.I NEED TO FIND

THE
RIGHT SET OF OF NUMBERS FROM THIS GROUP THAT WILL ADD UP THE CLOSEST

TO
100,000 WITHOUT GOING UNDER.








All times are GMT +1. The time now is 06:37 PM.

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