#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Random

ok thankyou

Will give it a go

Greg


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting random Data created from a random formula Six Sigma Blackbelt Excel Discussion (Misc queries) 1 September 11th 08 11:03 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM
random nyn04[_4_] Excel Programming 2 September 21st 04 11:35 PM


All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"