Randomising a list

A list can be sorted into random order by inserting a list of random numbers in an adjacent column and sorting both columns on the random number column.

A similar procedure can be carried out through a VBA subroutine, avoiding the need to insert a column of random numbers on the spreadsheet.  A spreadsheet incorporating this routine can be downloaded from: randomise list.zip

Features of this procedure are:

  • The range to be sorted is selected through a dialog box, with the default range being either the pre-selected range, or if there is no selection, the previously used range (if any).
  • The random number array is sorted using the combsort routine.
  • The range to be sorted can be a single column, or multiple columns.

The range selection dialog is shown in the screen-shot below:

Randomise a List

Randomise a List

This entry was posted in Excel, VBA and tagged , , . Bookmark the permalink.

2 Responses to Randomising a list

  1. Pingback: Randomise List | AllGraphicsOnline.com

  2. Pingback: Daily Download 33: Miscellaneous | Newton Excel Bach, not (just) an Excel Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.