+ Reply to Thread
Results 1 to 2 of 2

How to choose random cases and list them

Hybrid View

  1. #1
    Registered User
    Join Date
    03-28-2016
    Location
    California
    MS-Off Ver
    2016
    Posts
    6

    How to choose random cases and list them

    Hi,

    Our pivot table shows some managers and some employees under the given manager. Every employee has some case numbers, what we need is to choose 5 random case number for each employee and list the data with case IDs and other stuff related with those case IDs in the another worksheet.

    Any help would be appreciated. Thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to choose random cases and list them

    Hi,

    One way would be to create a new column in your data and add the formula =RAND() on all the rows.
    Now, probably with a looping macro,

    1. Use Data Filter to filter all the records including the random value for an employee to a temporary holding area.
    2. With this temporary set of records filter this for the top 5 values in the random column.
    3. Copy the 5 filtered rows to the destination sheet.

    Repeat 1-3 for each employee
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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] Random Choose Cell of a Row
    By hello_hello in forum Excel General
    Replies: 2
    Last Post: 10-18-2015, 04:56 AM
  2. [SOLVED] Choose random integer from list. Define probability for each member.
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2015, 06:29 AM
  3. [SOLVED] Choose random number between given values
    By Hitch75 in forum Excel General
    Replies: 3
    Last Post: 07-02-2015, 06:27 AM
  4. How to choose random sample in dataset with
    By LinnEspensen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2014, 10:51 AM
  5. Add cases opened and closed for each month and specifics about the cases.
    By ChrisLaRoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2014, 08:19 PM
  6. [SOLVED] If row contains 1(s) then choose random column title
    By sniglet in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-10-2013, 01:09 PM
  7. Choose Random Value Based On List
    By kblaine in forum Excel General
    Replies: 5
    Last Post: 04-20-2011, 02:41 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