View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default How do I sort randomly a list of 22 numbers

With a staging column:
In A1:A22, enter formula:
=RAND()*RAND()

in B1:B22, enter formula:
=RANK(A1,A$1:A$22)

Column B gives the 22 numbers in a random order.

There is an infinitesimal possibility that formula in A returns twice the
same number, in which case column B will also return twice the same number.

To check that eventuality, add a cell with following ARRAY formula:
=SUM(COUNTIF($B$1:$B$22,B1:B22))=ROWS(B1:B22)
(validate with Ctrl+Shift+Enter)

If that cell shows FALSE, press F9 again.

See example : http://cjoint.com/?fvkKq5ySSy

HTH
--
AP

"Deal or No Deal game simulation" <Deal or No Deal game
a écrit dans le message de news:
...
I have an array of 22 numbers from 1 to 22 in a column. By pressing F9 i
want
to be able to change their position randomly in the column. How can I do
this? In essence the numbers selected are not random number but what want
to
be random is the numbers position within the range of cells