[ QUOTE ]
[ 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]
[/ QUOTE ]
As sorry, I didn't realize you wanted to re-sample.
I think figuring this out in excel will end up such a pain that just writing a small program which takes a text/csv file as input and outputs another text/csv file with the re-sampled data might be easiest.
I
think you can do sampling with replacement from within excel though:
1) You need to first install the "Analysis Tool Pack" which comes with excel - see here:
http://www.cpearson.com/excel/ATP.htm
2) Then you need to follow the instructions from here:
http://bcs.whfreeman.com/ips4e/suppl...cel/03_IPS.pdf
Sadly, I can't seem to find my MS-Office CD so can't test it myself, but I think it should work.
Juk [img]/images/graemlins/smile.gif[/img]