+ Reply to Thread
Results 1 to 3 of 3

How do I divide a data set into a specified number of groups

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    10

    How do I divide a data set into a specified number of groups

    I have a data set with 1811 people (each row represents one person). How do I create a new variable that divides the 1811 people into 10 groups sequentially? For example the first 181 individuals are assigned a "1", the next 181 individuals are assigned a "2", and so on until the 10th group consists of 181 people + the remainder?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How do I divide a data set into a specified number of groups

    with your data in column A, in B1 enter 1, then in B2, copied down, use this....

    =IF(MOD(ROW(),10)=0,B1+1,B1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-27-2012
    Location
    Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    10

    Re: How do I divide a data set into a specified number of groups

    Thanks, I got it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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