+ Reply to Thread
Results 1 to 5 of 5

Sorting random numbers into equal categories

  1. #1
    Registered User
    Join Date
    03-21-2017
    Location
    sdsd
    Posts
    2

    Sorting random numbers into equal categories

    I am fairly new to spreadsheets and am wondering if there is a better solution than just manually comparing numbers. I have a bunch of batteries of different capacity that I need to sort into a number of groups where the total number in that group equals the average of all the cells combined divided by the total groups. It doesn't need to be exact, just very close. This block is an example. Scroll down to the colored one. I want each orange number to be the green number or as close as possible. I have the data set (blue to the right) that needs to be evenly distributed each time into the red cells. This block is an example of what I want to have every time I give it a block of data, I just don't know how to make it do that unless I manually 1 by 1 adjust it until it lines up. Anyone know how to do this? Thanks!
    Attached Files Attached Files
    Last edited by joblessalex; 03-22-2017 at 12:02 AM. Reason: Changed link to attachment

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Sorting random numbers into equal categories

    Hello and Welcome to Excel Forum.
    Take a look at sheet 2 of the attached file and see if it looks like it could evolve into something useful.
    The battery capacity is in column A (I used a random function for demonstration purposes).
    The batteries are sorted by capacity largest to smallest in column B.
    The pack assignments are made on a rotating basis in column C. (somewhere in the recesses of my mind I have a thought that there is a way to generate this number pattern by formula, however I want to make sure that this looks promising before trying to find it)
    Variances are listed in column H. If those look to be within tolerance then we could pursue this line further, if not perhaps someone will get some inspiration for something better.
    In the future please upload workbooks directly by clicking on the GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    03-21-2017
    Location
    sdsd
    Posts
    2

    Re: Sorting random numbers into equal categories

    Thanks a ton for the help! You actually nailed it. Everything is within +- about 100 of each other. I've fixed my post and hopefully I can help others in the future here.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Sorting random numbers into equal categories

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Sorting random numbers into equal categories

    I had said that I would try to remember the formula that generates the number pattern for column C so that it will make assignments for different numbers of packs.
    A formula, pasted into C2 and copied down, that will do that is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The attached file makes use of the functionality offered by this formula and will work for the following factors of 60. Try changing D2 to 2,3,5,6,10, or 12.
    Let us know if you have any questions.
    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. Replies: 2
    Last Post: 11-29-2016, 10:21 AM
  2. Trying to get random numbers that equal a specified amount
    By mjrubin23 in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 11-10-2016, 02:54 PM
  3. Generate random numbers from a list that would equal to a given value
    By Qutaibah in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-02-2014, 09:58 PM
  4. Delete rows if 2 categories are equal
    By Rompetelo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2013, 05:25 PM
  5. Sorting a list of numbers into groups of equal value
    By peter4432 in forum Excel General
    Replies: 0
    Last Post: 05-25-2011, 11:38 AM
  6. random numbers to equal a total
    By dealer in forum Excel General
    Replies: 8
    Last Post: 10-11-2010, 05:52 PM
  7. Random Numbers Not Equal to
    By Joe Blow in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-03-2005, 04:06 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