+ Reply to Thread
Results 1 to 7 of 7

Random number generator

  1. #1
    Registered User
    Join Date
    08-11-2007
    Posts
    3

    Random number generator

    I have a list of 100 numbers(listed from 1 to 100) and I want excel to randomly pick 10 of the numbers. How do I put this into excel?

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by uncee
    I have a list of 100 numbers(listed from 1 to 100) and I want excel to randomly pick 10 of the numbers. How do I put this into excel?
    Hi,

    use the first 10 rows of column C of the attached.

    Column D will shuffle the set if some entries in column A are removed (to be not used etc)

    hth
    ---
    Attached Files Attached Files
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    08-11-2007
    Posts
    3
    I don't understand what you said. I want excel to pick 10 random numbers from 1-100.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You could try this.

    A1 should be blank. In A2 enter this formula

    =LARGE(IF(COUNTIF(A$1:A1,ROW($1:$100))<1, ROW($1:$100)),1+INT(RAND()*(100-ROW()+ROW(A$2))))

    confirmed with CTRL+SHIFT+ENTER

    copy down to A11

    If you press F9 or if worksheet re-calculates, the number are re-generated

  5. #5
    Registered User
    Join Date
    08-11-2007
    Posts
    3
    Quote Originally Posted by daddylonglegs
    You could try this.

    A1 should be blank. In A2 enter this formula

    =LARGE(IF(COUNTIF(A$1:A1,ROW($1:$100))<1, ROW($1:$100)),1+INT(RAND()*(100-ROW()+ROW(A$2))))

    confirmed with CTRL+SHIFT+ENTER

    copy down to A11

    If you press F9 or if worksheet re-calculates, the number are re-generated

    Got to part "copy down to A11"

    I pressed F9 and nothing happened. i'm using excel 2003

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You need to confirm formula with CTRL+SHIFT+ENTER

    This means that you put formula in A2, press F2 key. Hold down CTRL and SHIFT keys and at the same time press ENTER. Curly braces like { and } should appear around the formula in the formula bar. See example attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-14-2006
    Posts
    8
    try going to data, data analysis, sampling

+ 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