+ Reply to Thread
Results 1 to 2 of 2

Need to Randomly select entries that match a specific criteria

  1. #1
    Registered User
    Join Date
    06-05-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    1

    Unhappy Need to Randomly select entries that match a specific criteria

    Hi,

    Tried this formula initially but its pulling random entries without considering the criteria set.

    INDEX(Data!$B$2:$B$32901,LARGE(IF(Data!$D$2:$D$32901=B1,ROW(Data!$D$2:$D$32901)-ROW(Data!$D$3)+1),INT(RAND()*COUNTIF(Data!$D$2:$D$32901,B1)+1)))

    Have uploaded the file, really hope someone can tell me what i messed up.

    An extract of the dataset is as per below. Basically i want to pull random entries of PINNO from specific locations.

    Tranno PINNO AgentName Location
    1142 *21234 V SDN BHD CAM
    1145 *21345 V SDN BHD BM
    1141 *12345 V SDN BHD CAM
    1140 *PMM145 V SDN BHD CAM
    1144 *PMM155 V SDN BHD PGI
    1147 *PMM175 V SDN BHD PGI
    1146 *PMM195 V SDN BHD PGI
    1148 *21237 V SDN BHD PGI
    1156 *21347 V SDN BHD BM
    1159 *12344 V SDN BHD BM

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Need to Randomly select entries that match a specific criteria

    =iferror(index($a:$a,aggregate(14,6,row($a$5:$a$24)/($b$5:$b$24=$d$1),randbetween(1,countif($b$5:$b$24,$d$1)))),"")
    Attached Files Attached Files

+ 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] criteria in Select query to show last 4 entries
    By boss1982 in forum Access Tables & Databases
    Replies: 11
    Last Post: 10-18-2017, 04:22 AM
  2. RANDomly select from list IF criteria is met
    By Framci in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-30-2015, 05:49 PM
  3. Index/Match to Match entries on multiple criteria
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 02:32 PM
  4. How can I get entries after specific date criteria
    By kisanvikas2015 in forum Excel General
    Replies: 1
    Last Post: 04-14-2015, 09:14 AM
  5. [SOLVED] Create a list of unique entries that did not meet a specific criteria
    By joannelittell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2013, 12:08 PM
  6. Summing specific entries based on criteria
    By KaitMacN in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2011, 08:47 AM
  7. Randomly select specific numbers from array
    By carbonboywonder in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2011, 09:56 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