#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 127
Default RANDBETWEEN

Hi All,

If I use RANDBETWEEN function to generate random samples, how do I make sure
that units are not repeate?

For example-

I have 1000 units and I have to generate 30 samples. I will use
RANDBETWEEN(1,30) in 30 cells. How do I make sure that the numbers are not
repeated and all the samples are unique?

Thanks in advance for any help.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 127
Default RANDBETWEEN

Sorry. I will use =RANDBETWEEN(1,1000) in 30 cells


"Gaurav" wrote in message
...
Hi All,

If I use RANDBETWEEN function to generate random samples, how do I make
sure that units are not repeate?

For example-

I have 1000 units and I have to generate 30 samples. I will use
RANDBETWEEN(1,30) in 30 cells. How do I make sure that the numbers are not
repeated and all the samples are unique?

Thanks in advance for any help.





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default RANDBETWEEN

See John McGimpsey's site for instructions on resolving this problem

http://www.mcgimpsey.com/excel/udfs/randint.html


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 16:16:20 -0600, "Gaurav"
wrote:

Hi All,

If I use RANDBETWEEN function to generate random samples, how do I make sure
that units are not repeate?

For example-

I have 1000 units and I have to generate 30 samples. I will use
RANDBETWEEN(1,30) in 30 cells. How do I make sure that the numbers are not
repeated and all the samples are unique?

Thanks in advance for any help.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default RANDBETWEEN

One way to generate random numbers without replacement:

Enter the Rand function in an out-of-the-way location of your sheet,

=Rand()

And copy down,
say Z1 to Z1000.

Then enter this formula anywhe

=INDEX(ROW($A$1:$A$1000),RANK(Z1,$Z$1:$Z$1000))

And copy down as many rows as the amount of numbers you need.

Each time you hit <F9, you'll get a new random list.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Gaurav" wrote in message
...
Sorry. I will use =RANDBETWEEN(1,1000) in 30 cells


"Gaurav" wrote in message
...
Hi All,

If I use RANDBETWEEN function to generate random samples, how do I make
sure that units are not repeate?

For example-

I have 1000 units and I have to generate 30 samples. I will use
RANDBETWEEN(1,30) in 30 cells. How do I make sure that the numbers are
not repeated and all the samples are unique?

Thanks in advance for any help.







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
randbetween(1.1,1.25) Deniz Excel Worksheet Functions 3 July 10th 07 04:40 PM
RANDBETWEEN pkeegs Excel Worksheet Functions 6 April 27th 07 01:12 AM
RANDBETWEEN Michel AUDIFFREN Excel Discussion (Misc queries) 0 February 26th 06 11:02 PM
Randbetween Gbonda Excel Discussion (Misc queries) 1 June 30th 05 02:39 PM
randbetween gives ?NAME Kristjan_Thor Excel Discussion (Misc queries) 5 March 14th 05 11:41 PM


All times are GMT +1. The time now is 03:18 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"