+ Reply to Thread
Results 1 to 4 of 4

Combination with defined set of numbers

  1. #1
    Registered User
    Join Date
    09-05-2017
    Location
    Utah
    MS-Off Ver
    10
    Posts
    1

    Combination with defined set of numbers

    Here's what I'd like to do:

    I need a formula(s) that determines which numbers from a list of numbers can be combined so that they DO NOT exceed another pre-defined number.

    EX: 22.9, 8.1, 4, 22.9, 22.9 are listed numbers. They must be organized so that they do not exceed 32. So the answer would be something like: 22.9, 31, 26.9 OR 22.9, 22.9, 22.9, 12.1. The first answer being the best as it creates the least amount of results. Make sense?

  2. #2
    Forum Contributor shivya's Avatar
    Join Date
    08-19-2017
    Location
    Delhi, India
    MS-Off Ver
    2013
    Posts
    240

    Re: Combination with defined set of numbers

    =randbetween(20,31)
    To attach worksheet Go advanced -> Manage attachments -> Choose file -> Upload
    Don't forget to Mention your desired result in the sheet..
    There should be sample data only, a lot of data creates confusion.

    Thanks & Regards

    Shivya

    http://excelvbatipsforbeginners.blogspot.in/

  3. #3
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    697

    Re: Combination with defined set of numbers

    Enter the formula in a cell =RANDBETWEEN(12,31)+ROUNDDOWN(RAND(),1) and drag down.
    Use rank function =RANK(A1,$A$1:$A$12,1) in another cell and drag down.
    Later you can copy and paste (only values) and sort the data according to your needs.
    Attached Files Attached Files

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Combination with defined set of numbers

    If I understood your problem well, it is deterministic and not random.

    The solution I propose requires that your list be sorted in descending order.

    Assuming the data in B3:B7, use the following formula in D3 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file for clarification
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Match Pre-defined Numbers and Enter Pre-defined Text
    By pratnimk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2017, 04:41 AM
  2. [SOLVED] Please help need best combination of numbers.
    By shelim481 in forum Excel General
    Replies: 10
    Last Post: 11-11-2015, 04:12 PM
  3. A combination of 3 numbers that appear most
    By bines in forum Excel General
    Replies: 5
    Last Post: 12-09-2014, 12:44 PM
  4. combination of these numbers would sum
    By alisapooh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2009, 12:27 PM
  5. Combination formula to sum to a Defined Result
    By colloron in forum Excel General
    Replies: 1
    Last Post: 12-23-2008, 09:08 AM
  6. [SOLVED] combination of numbers
    By dc in forum Excel General
    Replies: 0
    Last Post: 06-08-2006, 02:55 PM
  7. combination of numbers
    By ErnestoMarti in forum Excel General
    Replies: 36
    Last Post: 10-23-2005, 05:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1