+ Reply to Thread
Results 1 to 3 of 3

Random sampling based on specific criteria from another column

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Random sampling based on specific criteria from another column

    Hello again!

    I have a workbook that contains data only in Sheet 1
    Row 1 contains Headers - The number of rows can vary from 2 - 20,000+
    Columns = A thru N
    Col A = Unique ID (Number)
    Col N = Names (Contains Duplicates)
    Cols B thru L contains mixed data

    I am using the following macro to copy a RANDOM 10% of every row in Sheet 1 into Sheet 2 which works great. The problem I have is I need to ensure that at least ONE of every Name listed in Col N is included in the 10% copied to Sheet 2.

    Please Login or Register  to view this content.
    Any help would be much appreciated!
    Last edited by symaxf; 07-06-2016 at 06:42 PM.

  2. #2
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: Random Sampling based on specific criteria from another column

    Hmmm, I see a lot of views but no replies to this thread so I am restating my request for clarity:

    I have a list of unique file numbers in Column A and a Name associated with it in Col N.
    There are 5000 rows of Data. I would like to pull a random sampling of the file numbers based on the following criteria:
    - 10% of the total File Numbers in Col A
    - At least 1 file for each Name (There are 100 unique Names)
    - The final 10% can contain duplicate Names but needs to contain at least one File Number for each Name

    So for this sample, Sheet 2 should contain 500 rows of data containing 100 unique Names.

    Can this be done?

    Thx!

  3. #3
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: Random sampling based on specific criteria from another column

    Did I stump the experts or do I need to add a sample file???

+ 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] Creating controlled random numbers across multiple columns
    By terryhenderson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2016, 12:20 PM
  2. [SOLVED] Random List Generator How to copy Columns A and B to Sheet 2
    By guitarsweety in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-08-2014, 09:01 PM
  3. Random number generation across multiple ros/columns without repeats
    By Zodeeak in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-27-2014, 03:15 PM
  4. [SOLVED] select random cells from multiple sheets and copy
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2014, 06:24 PM
  5. Replies: 9
    Last Post: 12-15-2013, 10:05 PM
  6. Replies: 4
    Last Post: 12-22-2012, 01:41 PM
  7. copy random columns
    By bhatrakesh@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2011, 07:38 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