Re: Random picking of hands from a database
[ QUOTE ]
[ QUOTE ]
It would probably be easier to pull them from the database directly - or you could use some of that WSH scripting to pick random cells from Excel.
There must be a way to do it from excel itself, probably with VBA - I don't know enough to tell you how to do it in that way.
Maybe xpost in CTH? - there are lurking excel gurus in there on occasion [img]/images/graemlins/smile.gif[/img]
[/ QUOTE ]
Create a new column of random numbers and sort using them, then pick however many you want from the top of the randomly sorted list.
To create the random column, just use "=Rand()" which will create reals in the range {0..1}, then double click the "magic" excel duplication thingy (not sure what it's called...).
Juk [img]/images/graemlins/smile.gif[/img]
[/ QUOTE ]
This is a clever idea, but if I understand it correctly, you will only pick each number just once?
This is more of a probability density exercise, which I wasn't clear about initially.
I would like a program to go into the list of numbers and select one value, copy it, and then pull it out.
Then repeat on the intact sample (not n-1).
Do a total of "a lot of times", like at least 10,000+.
Then repeat this whole process about 30-40 times.
Your method should do this, but the next question is how, in Excel, I can repeat this (not manually). My understanding is that For/Next, If/Then loops take a long time in Excel [img]/images/graemlins/confused.gif[/img] [img]/images/graemlins/confused.gif[/img]
|