+ Reply to Thread
Results 1 to 8 of 8

Group number values into equal groups

  1. #1
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Group number values into equal groups

    I can't seem to resolve this issue. I have 76 numbers which range from -7 to 25. There are some duplicates. I am trying to form 19 groups of 4 with as close to the same total as possible. Any help would be greatly appreciated.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Group number values into equal groups

    It would help if you attached a sample Excel workbook - the second yellow banner at the top of the screen explains how you can do this.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Group number values into equal groups

    I hope that I attached it correctly
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Group number values into equal groups

    The following approach gets you somewhere near to what you want, but the totals have a greater spread than in your example. I used columns I onwards, with these formulae in the cells stated:

    I2: =INDEX($A:$A,COLUMNS($E:E)+1)

    I3: =INDEX($A:$A,40-COLUMNS($E:E))

    I4: =INDEX($A:$A,38+COLUMNS($E:E)+1)

    I5: =INDEX($A:$A,78-COLUMNS($E:E))

    I7: =SUM(I2:I5)

    Column I represents Group 1, and you can then copy those formulae to the right, up to and including column AA, to give you the 19 groups. The formulae on row 7 show the totals for each group, varying from 38 to 45, although 9 of them are either 40 or 41 as you requested.

    Hope this helps.

    Pete

  5. #5
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Group number values into equal groups

    Thank you very much.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Group number values into equal groups

    You're welcome. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  7. #7
    Forum Contributor
    Join Date
    08-19-2012
    Location
    Tacoma, Washingtonn
    MS-Off Ver
    Excel 2019
    Posts
    254

    Re: Group number values into equal groups

    Thank you again for your prompt response/help. I was hoping to get another idea/formula that more closely put my groups closer to the average of 40/41. Should I clear this one and create another?

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Group number values into equal groups

    No, stay with this one, and you can certainly leave the thread open for a while in the hope of further replies.

    Pete

+ 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: 11
    Last Post: 11-19-2019, 11:36 PM
  2. Need some help dividing a list of values into groups with equal sums
    By rpike623 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-15-2018, 05:46 PM
  3. Separating a range of values into equal sum groups
    By SMUSIC07 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-27-2014, 02:36 PM
  4. How to divide a group of numbers in to 3 groups as equal as possible.
    By herbeey in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-27-2013, 08:10 PM
  5. How do I group many numbers into 100 equal groups?
    By drdirt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2013, 11:29 PM
  6. Divide set of number into three equal sum groups
    By aboelsous in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-13-2013, 03:09 AM
  7. Number of equal groups given a total amount
    By traceyonley777 in forum Excel General
    Replies: 2
    Last Post: 02-23-2012, 09:52 AM

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