Results 1 to 4 of 4

Thread: Random sort

  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia, Victoria, Australia
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Random sort

    Hello,

    I have a list of 10 names and I want to randomly sort them. I can see how to sort ascending and descending, however, I cannot figure out how to sort randomly. Any suggestions?

    Thanks,
    AJB.

  2. #2
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    Re: Random sort

    Hi
    I am intrigued .. almost a contradiction of terms.
    In an adjacent column could you assign a random number and sort on this column ...

    This could make use of the randbetween() function....
    =randbetween(x,y)

    I haven't tried it but you would probably have to do an
    EDIT>PasteSpecial>ValuesOnly .. before you sorted on Col2 as the function will automatically recalc at sort time ..

    Cheers
    G

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Random sort

    A User defined Random Number generator would work as it would not automatically recalculate unless specifically designed to. The following function accepts one argument as the upper limit and returns a number between 1 and the upper limit. It can produce duplicates of course. <pre>Function RandomSortNo(Limit As Integer)
    RandomSortNo = Int((Limit * Rnd) + 1)
    End Function</pre>

    The normal Randbetween could also be used if calculation mode was set to manual.

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Random sort

    Try putting =Rand() in the cells beside your column, and then sort both columns on the second, randomly-generated column.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •