+ Reply to Thread
Results 1 to 6 of 6

Duplicate Sample Selection

  1. #1
    Registered User
    Join Date
    01-28-2020
    Location
    Halifax Canada
    MS-Off Ver
    10
    Posts
    9

    Duplicate Sample Selection

    I am trying to select random sampled invoices for auditing based on population size (say 10% of population) and certain parameters based on the formulas. However I am getting duplicate samples some of the time. Can someone please review attached file Cell Q1047720 and onwards and suggest changes to the formula to avoid duplicate sample selection.

    Please bear in mind below: -
    1. Population size will vary month on month and so the sample size
    2. 10% sample of overall population is based on certain parameters (Research related and more than $2000) so the formula in O1047720 and P1047720 onwards are required
    3. Certain rows will need manual elimination through Macros in Row 1 to 100000 therefore these rows cannot be used to place formula for sample selection

    Thanks for your help in advance.

    Regards
    Anil
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-28-2020
    Location
    Halifax Canada
    MS-Off Ver
    10
    Posts
    9

    Re: Duplicate Sample Selection

    Can anyone help please?

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Duplicate Sample Selection

    Hi there,

    Here's a cheap 'n' cheerful approach!

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Please note that the very first Index No in the random list might be duplicated, but if you use only Invoice Nos from row two onwards they should be unique.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-28-2020
    Location
    Halifax Canada
    MS-Off Ver
    10
    Posts
    9

    Re: Duplicate Sample Selection

    This is Amazing.. Thanks a lot.

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Duplicate Sample Selection

    Hi again,

    Many thanks for your very prompt feedback.

    You're welcome - glad I was able to help.

    Regards,

    Greg M

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Duplicate Sample Selection

    Another solution is to generate random numbers using RAND for each row of records, then pick up the records with the smallest or largest random numbers in ascending or descending sequence. There may be a chance that the random numbers generated may contain duplicates and a chance that the duplicate records got picked up in our samples, but it's probably very remote.

    To change the sample size, change the value in cell R3.
    Attached Files Attached Files
    Last edited by josephteh; 10-22-2020 at 09:45 PM.

+ 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] Sample selection in Excel
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-06-2005, 09:05 PM
  2. Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. [SOLVED] Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Sample selection in Excel
    By Gary's Student in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 09-06-2005, 05:05 AM
  5. Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  6. [SOLVED] Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] Sample selection in Excel
    By AndersonsWorks in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-31-2005, 01:05 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