Hi Guys,
I made a post entitled "Autosort numbers from low to high" and in this post I wanted to generate a range of random numbers and sort them from low to high. Dav uploaded a VBA routine to do this and can be seen in the link below.
http://www.excelforum.com/showpost.p...7&postcount=15
I wanted to expand on this code and do a probability experiment.
Now in cells D14 to M14 I will manually enter a selection of non duplicated numbers, in Cell F18 I wanted a counter which will increment each time the rumbers are randomised.
Now when I hit the 'generate random number' button this will set the counter in cell F18 to 0 and then the code will start generating random numbers.
Now the numbers need to random generate until all of the numbers in cells A2 to A11 match the values in D14 to M14 and then the loop can stop once all 10 random generated numbers match the numbers I enter in row 14, now the counter should tell how many loops it took to generate the match all 10 numbers.
Can someone please help me expand on the code in the attached spreadsheet in the link above to achieve this?
Thanks.
Bookmarks