ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   random not truely random. (https://www.excelbanter.com/excel-programming/384382-random-not-truely-random.html)

Kevin

random not truely random.
 
I'm using this...
CurrPick = Int((54 * Rnd) + 1)
but it is not random. every time you restart the userform the same sequence
of random numbers comes up.

Is there a way to get a truely random number that wont repeat every time you
activate the user form?

Tom Ogilvy

random not truely random.
 
randomize
CurrPick = Int((54 * Rnd) + 1)

--
Regards,
Tom Ogilvy


"Kevin" wrote:

I'm using this...
CurrPick = Int((54 * Rnd) + 1)
but it is not random. every time you restart the userform the same sequence
of random numbers comes up.

Is there a way to get a truely random number that wont repeat every time you
activate the user form?


Kevin

random not truely random.
 
Wow, I love it when there is an easy fix for something.

Thanks much Tom, you have a lot of great solutions on this board..

"Tom Ogilvy" wrote:

randomize
CurrPick = Int((54 * Rnd) + 1)

--
Regards,
Tom Ogilvy


"Kevin" wrote:

I'm using this...
CurrPick = Int((54 * Rnd) + 1)
but it is not random. every time you restart the userform the same sequence
of random numbers comes up.

Is there a way to get a truely random number that wont repeat every time you
activate the user form?


Charles Chickering

random not truely random.
 
You can try this:
RandNum = Evaluate("=Rand()")

--
Charles Chickering

"A good example is twice the value of good advice."


"Kevin" wrote:

I'm using this...
CurrPick = Int((54 * Rnd) + 1)
but it is not random. every time you restart the userform the same sequence
of random numbers comes up.

Is there a way to get a truely random number that wont repeat every time you
activate the user form?



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com