+ Reply to Thread
Results 1 to 4 of 4

Unique random numbers

  1. #1
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109

    Unique random numbers

    Excel 2010

    I want to generate 10 numbers all between 1 and 100 inclusive.

    I believe this does that:
    Please Login or Register  to view this content.
    However I am not sure how to make them all unique from each other at each page refreash

    Any help will be appreciated

    dave
    Last edited by ducecoop; 05-09-2012 at 04:43 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Unique random numbers

    One of several ways:

    List the numbers 1 to 100 down a column, and in the adjacent column, =RAND()

    Sort by the latter column and use the first 10 numbers.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Unique random numbers

    dave,

    Attached is an example workbook based on the critieria described.
    In column J are the numbers 1 to 100
    In column I is the formula: =RAND()
    In column H is the formula: =RANK(I1,$I$1:$I$100,0)+COUNTIF($I$1:$I$100,I1)-1

    Column H uses the random numbers in column I to give each random number a unique rank, from 1 to 100, in a random order. Column A then grabs the top 10 random numbers.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    10-16-2008
    Location
    San Diego
    Posts
    109

    Re: Unique random numbers

    I will try both ideas and use the one that works best.

    Thanks so much guys

    Dave

+ 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