+ Reply to Thread
Results 1 to 4 of 4

How do you avoid duplicates when using the randbetween function?

  1. #1
    Monica
    Guest

    How do you avoid duplicates when using the randbetween function?

    I am trying to use the rand or randbetween function to select random samples,
    but I keep receiving duplicate numbers. For example, I have a list of 70
    samples but only want to select 25. I type in the formula and then drag it
    down 25 cells, but some of those cells have the same number. How do I make
    them unique?

    Thanks!


  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If you put the formula

    =RAND() in A1 and copy down to A70 then in B1

    =RANK(A1,A$1:A$70)

    and copy down to B25 this should give you 25 different integers between 1 and 70

  3. #3
    JE McGimpsey
    Guest

    Re: How do you avoid duplicates when using the randbetween function?

    Take a look here:

    http://www.mcgimpsey.com/excel/udfs/...noreplace.html


    In article <[email protected]>,
    Monica <[email protected]> wrote:

    > I am trying to use the rand or randbetween function to select random samples,
    > but I keep receiving duplicate numbers. For example, I have a list of 70
    > samples but only want to select 25. I type in the formula and then drag it
    > down 25 cells, but some of those cells have the same number. How do I make
    > them unique?
    >
    > Thanks!


  4. #4
    Registered User
    Join Date
    09-28-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    1

    Re: How do you avoid duplicates when using the randbetween function?

    Thanks for the help. Nice forum

+ 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