+ Reply to Thread
Results 1 to 5 of 5

Split dataset into two groups with minimum deviation on multiple values

  1. #1
    Registered User
    Join Date
    07-15-2019
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel for Mac, MS 365
    Posts
    3

    Question Split dataset into two groups with minimum deviation on multiple values

    Hi Excel Forum!

    I have a really interesting task I am trying my best to solve, but I got stuck. I need an expert!

    I need to divide a dataset into two groups with a minimum difference/deviation in each of the parameters used.

    The purpose is to divide a country into two "equal" sizes to be able to apply some local initiatives in a select set of cities (one of the two groups) to see the effects.

    I have tried two things:
    1. Using choose+rand to assign Group A or Group B to each of the rows and then using Solver to get as close to 0,00% deviation for one parameter. However, this has the flaw of only covering 1 value/parameter - and it is highly imprecise.
    2. I then found a VBA and tried to tweak it, but with no luck. It does a really great job of dividing into two equal groups (sum) but, the number of items in each group varies a lot. In other words, I could also only get this to work for 1 value/parameter.

    I am not skilled enough to do anything that covers multiple values.

    Can anyone point me in the right direction of what I should look into? This would be really helpful - and thank you so much in advance.


    For reference I have pasted the VBA I found in another thread:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by te00; 07-15-2019 at 05:21 AM. Reason: Added Excel file for reference

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,209

    Re: Split dataset into two groups with minimum deviation on multiple values

    Off topic, but could you please clarify which 'latest' version you have and update your profile accordingly? Excel 2019 and Office 365 are not actually the same thing, and your version may influence solutions offered as we move forward. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-15-2019
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel for Mac, MS 365
    Posts
    3

    Re: Split dataset into two groups with minimum deviation on multiple values

    Hi AliGW

    Of course, sorry.

    Excel for Mac 16.26 (auto-updated with recent submits). It is licensed through Office 365 subscription.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,209

    Re: Split dataset into two groups with minimum deviation on multiple values

    OK - please update your user profile stating that it is Excel for Mac 365.

  5. #5
    Registered User
    Join Date
    07-15-2019
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel for Mac, MS 365
    Posts
    3

    Re: Split dataset into two groups with minimum deviation on multiple values

    Hi all

    Any suggestions on how to do this / approach this?

+ 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: 0
    Last Post: 06-22-2017, 08:37 AM
  2. Replies: 3
    Last Post: 05-03-2017, 10:47 AM
  3. [SOLVED] Need to sequentially number dataset in groups
    By Chloefj in forum Excel General
    Replies: 3
    Last Post: 08-24-2015, 03:45 PM
  4. Standard Deviation of Groups in List
    By mbwd in forum Excel General
    Replies: 6
    Last Post: 03-14-2014, 12:54 PM
  5. Copying a dataset multiple times - and selecting titles for this dataset
    By alocke in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-07-2012, 10:15 PM
  6. Vlookup for Multiple Values with Large Dataset
    By shanipk82 in forum Excel General
    Replies: 0
    Last Post: 02-06-2012, 05:11 PM
  7. random split dataset
    By news.leidenuniv.nl in forum Excel General
    Replies: 3
    Last Post: 09-20-2005, 10:05 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