• Random sort

    • This topic has 3 replies, 4 voices, and was last updated 24 years ago.
    Author
    Topic
    #355199

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #523442

      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

      • #523448

        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.

        Function RandomSortNo(Limit As Integer)
            RandomSortNo = Int((Limit * Rnd) + 1)
        End Function

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

    • #523557

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

    Viewing 1 reply thread
    Reply To: Random sort

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: