ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Random Number Formulas (https://www.excelbanter.com/excel-programming/280831-random-number-formulas.html)

carlstedt

Random Number Formulas
 
It's easy to generate a random number between 1 and 20 (in this example)
with "=randbetween(1,20)" . However, with this formula a number may
be duplicated.

How can a random number be generated so that no number is repeated ?
In other words, how do I enter the formula to create unique random
numbers between 1 and 20 ?

Thanks !



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Tom Ogilvy

Random Number Formulas
 
Sounds like you want to shuffle 20 numbers

In column A, enter 1 to 20
in column B put in the formula

=rand()

then select A1:B20 and sort on column B.

--
Regards,
Tom Ogilvy


"carlstedt" wrote in message
...
It's easy to generate a random number between 1 and 20 (in this example)
with "=randbetween(1,20)" . However, with this formula a number may
be duplicated.

How can a random number be generated so that no number is repeated ?
In other words, how do I enter the formula to create unique random
numbers between 1 and 20 ?

Thanks !



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 06:39 AM.

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