+ Reply to Thread
Results 1 to 3 of 3

putting random numbers in order

  1. #1
    Registered User
    Join Date
    05-24-2011
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    9

    Post putting random numbers in order

    I would like to generate random numbers between two values, then have the list ordered from smallest to largest. I need 20 random numbers between two values that are kept on the same sheet. I am not worried about duplicates, however I need the random list to be ordered from smallest to largest.

    More details:
    in cell A2 I have the lower bound
    in cell A3 I have the upper bound
    I would like the results to display in column C

    So, if I had
    A2=1
    A3=43
    I have currently used RANDBETWEEN($A$2,$A$3) for the 20 entries in column C, however the listing isn't ordered/sorted from largest to smallest.

    I know I can copy the column and paste it as values to another column, then sort the list, however I was wondering if I could get these 20 random values ordered automatically.

    I am using Excel 2007.
    Last edited by okg; 06-06-2011 at 12:31 PM. Reason: problem solved!

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: putting random numbers in order

    You will need to use a helper column. If you have your initial results in C1:C20, in D1 put:

    Please Login or Register  to view this content.
    Then copy down to D20.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    05-24-2011
    Location
    Earth
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: putting random numbers in order

    thanks! this works great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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