0

I'm trying to make a set box of cells populate in a random appearing order. I have it just running through way more iterations than necessary so that the entire box populates. I wish to exclude previous selections to make the process quicker and more fluid. Thank you!

Community
  • 1
  • 1
  • Note the comment in that answer by @A. Webb , the shuffle given in that answer _is_ biased. The [wikipedia link](http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Potential_sources_of_bias) given shows how to do an unbiased shuffle. – chris neilsen Nov 28 '13 at 07:14

1 Answers1

0

I am sure this has millins of anwers. what I will explain you what I would do. then you can paste your code and if you have problems someone can help you.

I would make a routine that sorts your array randomly, how? add to your array another column where you will place a ramdon number generated by excel. then sort your array according to your random number. I will make an example:

Original array:

(your int column,Rand column)

(1,0.3212) (2,0.7423) (3,0.0311) (4,0.03144) (5,0.952)

then if you order it you will get something like this:

5 2 1 4 3

then all you have to do is return next item in your array and of cource they wil never repeat.

I think this is a really fast way.

Hope it helps

bto.rdz
  • 6,636
  • 4
  • 35
  • 52