Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
One way would be to put in a column say H the Rand() function for each row
with a name in column G. Then sort the list G:H using column H. Since the Rand() function is volatile - everytime the worksheet is changed the values are re-computed and repeated sorts will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) -- Cheers Nigel "Greg" wrote in message ... I would like to know how to get excel to make a random list of the names i have in column g. Is this possible? Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Hi Nigel,
will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) well, it is more "random-like" when you allways use Randomize at the beginning of the code and if you use myRandom = Rnd()^Rnd() for each random number you create. arno |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
(Note:
The random function is not a random as you might think but for this purpose it might suit you?) What are you referring to? -- Regards, Tom Ogilvy "Nigel" wrote in message ... One way would be to put in a column say H the Rand() function for each row with a name in column G. Then sort the list G:H using column H. Since the Rand() function is volatile - everytime the worksheet is changed the values are re-computed and repeated sorts will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) -- Cheers Nigel "Greg" wrote in message ... I would like to know how to get excel to make a random list of the names i have in column g. Is this possible? Greg |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Hi Tom,
The random function is not a random as you might think but for this purpose it might suit you?) What are you referring to? Have a look at VBA-help to Randomize. arno |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Nigel was referring to the worksheetfunction RAND. You are referring to the
VBA function RND. All random number generators are pseudo random number generators - Randomize changes where the current number enters the fixed stream of numbers - I don't see where using it would make the numbers anymore random (whatever that means - as far as I know the numbers are either random or they aren't - I haven't heard of any starndard for determining degrees of randomness - but it certainly isn't a topic of intense study for me). As far as rnd()^rnd() - has this passed some statistical test that shows it produces improved uniform random numbers (however that would be measured) - or at least that it produces uniform random numbers at all - I am not sure you can just assume that it does. After all, adding 6 random numbers together supposedly is one way to generate normally distributed random numbers. -- Regards, Tom Ogilvy "arno" wrote in message ... Hi Nigel, will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) well, it is more "random-like" when you allways use Randomize at the beginning of the code and if you use myRandom = Rnd()^Rnd() for each random number you create. arno |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Maybe you should look at the help on the worksheet function RAND and show us
all how to use randomize with that. -- Regards, Tom Ogilvy "arno" wrote in message ... Hi Tom, The random function is not a random as you might think but for this purpose it might suit you?) What are you referring to? Have a look at VBA-help to Randomize. arno |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Hi Tom,
Nigel was referring to the worksheetfunction RAND. You are referring to the VBA function RND. uhhh, sorry. Translation problem on my side :) All random number generators are pseudo random number generators I think that means, that there is a list of numbers around and excel picks the numbers from there. If you need a lot of random numbers they will simply repeat, which will cause some trouble if you need unique random numbers. Eg. I have macros in reports that write data to a logfile when the report is opened, a macro run, data updated, closed. I can link the actions together by a number which I create by random. Now, I had the problem of repeating numbers (20 reports, lots of people open them) which I solved with rnd()^rnd() as this simply increases the number of possible random numbers - the new random number has more digits. I always recommend to use randomize plus rnd()^rnd(). Besides creating "unique" numbers I think that many people try to use Excel random numbers for some exact scientific analysis. This analysis could be ignored simply by the fact of using excel as a random number generator that does not meet scientific expectations to random numbers. I hope my recommendation "improves" the random numbers of excel. However, I would greatly appreciate if someone could shed some light on how "good" excel random numbers are, for what analysis they can be used for and where one should not use excel. regards arno |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Hi Tom
I have been caught out before when I stated that Excel produces 'random numbers'. As I understand it Excel uses a matematical formula to create a pseudo random number sequence, where there is a relationship between succesive numbers. See http://support.microsoft.com/kb/q86523/ which describes this relationship. I personally have not conducted any tests (and do not intend to!) but I am prepared to accept the assertion by MS that this process will generate up 1 million unique numbers. This is all rather academic as the OP requirements are fairly simplistic and will not be comprimised by this limitation - as he has confirmed. As I said just being cautious! -- Cheers Nigel "Tom Ogilvy" wrote in message ... (Note: The random function is not a random as you might think but for this purpose it might suit you?) What are you referring to? -- Regards, Tom Ogilvy "Nigel" wrote in message ... One way would be to put in a column say H the Rand() function for each row with a name in column G. Then sort the list G:H using column H. Since the Rand() function is volatile - everytime the worksheet is changed the values are re-computed and repeated sorts will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) -- Cheers Nigel "Greg" wrote in message ... I would like to know how to get excel to make a random list of the names i have in column g. Is this possible? Greg |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Just wondered what you were referring to. All random number generators that
I have heard about are based on mathematical formulas that generate a repeatable sequence of numbers that can be considered random (thus the term psuedo-random) based on specific statistical tests. Some generators have a larger/longer period than others (how many numbers are generated before the sequence repeats). So you are correct that a random number generator produces numbers from a repeatable list so to speak. But after all, you wouldn't want a math function that produces different answers for the same inputs. -- Regards, Tom Ogilvy "Nigel" wrote in message ... Hi Tom I have been caught out before when I stated that Excel produces 'random numbers'. As I understand it Excel uses a matematical formula to create a pseudo random number sequence, where there is a relationship between succesive numbers. See http://support.microsoft.com/kb/q86523/ which describes this relationship. I personally have not conducted any tests (and do not intend to!) but I am prepared to accept the assertion by MS that this process will generate up 1 million unique numbers. This is all rather academic as the OP requirements are fairly simplistic and will not be comprimised by this limitation - as he has confirmed. As I said just being cautious! -- Cheers Nigel "Tom Ogilvy" wrote in message ... (Note: The random function is not a random as you might think but for this purpose it might suit you?) What are you referring to? -- Regards, Tom Ogilvy "Nigel" wrote in message ... One way would be to put in a column say H the Rand() function for each row with a name in column G. Then sort the list G:H using column H. Since the Rand() function is volatile - everytime the worksheet is changed the values are re-computed and repeated sorts will produce random lists. (Note: The random function is not a random as you might think but for this purpose it might suit you?) -- Cheers Nigel "Greg" wrote in message ... I would like to know how to get excel to make a random list of the names i have in column g. Is this possible? Greg |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
arno -
I always recommend to use randomize plus rnd()^rnd(). Besides creating "unique" numbers I think that many people try to use Excel random numbers for some exact scientific analysis. This analysis could be ignored simply by the fact of using excel as a random number generator that does not meet scientific expectations to random numbers. I hope my recommendation "improves" the random numbers of excel. < The worksheet function RAND and the VBA function RND produce uniformly distributed random numbers. That is, a number between 0.0 and 0.1 is as likely as a number between 0.9 and 1.0. The product RAND*RAND or RND*RND is random, but it is not uniformly distributed. Products between 0.0 and 0.1 are much more likely than products between 0.9 and 1.0. However, I would greatly appreciate if someone could shed some light on how "good" excel random numbers are, for what analysis they can be used for and where one should not use excel. < For such information about RAND, see http://support.microsoft.com/default...b;en-us;828795 - Mike www.mikemiddleton.com |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
I would like to know how to get excel to make a random list of the names i
have in column g. Is this possible? Greg |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
ok thankyou
Will give it a go Greg |
#13
Posted to microsoft.public.excel.programming
|
|||
|
|||
Random
Thanks to all
It actually is perfect for what i need. very easy to run an automatic system. I wanted it for a competition i am going to run and if it done by computer there can be no complaints. Thanks for all the help Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting random Data created from a random formula | Excel Discussion (Misc queries) | |||
Non-random numbers generated by excel's data analysis random gener | Excel Worksheet Functions | |||
Non-random numbers generated by excel's data analysis random gener | Excel Discussion (Misc queries) | |||
How do I find random number in list of random alpha? (Position is. | Excel Discussion (Misc queries) | |||
random | Excel Programming |