ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Random Sampling - Please Help! (https://www.excelbanter.com/excel-worksheet-functions/194880-random-sampling-please-help.html)

Lee Mathew

Random Sampling - Please Help!
 
Hi,

I would like to make a sample of 50 non-consecutive numbers. But everytime i do a sample, i get duplicate numbers. Could you please tell me a way where I could make a sample without duplicate numbers.

Thank you.

Gary Brown[_4_]

Random Sampling - Please Help!
 
Create the formula...
=int(rand()*100000)
Copy the formula down 49 rows then using Copy and Paste Special make the
formulas into values.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Lee Mathew" wrote:


Hi,

I would like to make a sample of 50 non-consecutive numbers. But
everytime i do a sample, i get duplicate numbers. Could you please tell
me a way where I could make a sample without duplicate numbers.

Thank you.




--
Lee Mathew


joeu2004

Random Sampling - Please Help!
 
On Jul 15, 6:18*am, Lee Mathew
wrote:
I would like to make a sample of 50 non-consecutive numbers. But
everytime i do a sample, i get duplicate numbers. Could you please tell
me a way where I could make a sample without duplicate numbers.


It is unclear whether you want a sampling from a specific set of (non-
consecutive) numbers that you have chosen, or from an arbitrary set of
non-consecutive numbers over some unspecified range. It is also
unclear whether the sample size or the "population" (from which you
sample) is 50.

To sample from a specific set of numbers, does the following meet your
needs?

Assume that you want a sample of 5 numbers in A1:A5 from a set of 50
numbers.

Put the numbers in consecutive rows in some column, for example
Y1:Y50. In some other column (e.g. Z1:Z50) put the formula =RAND().
Enter the following formula into A1 and copy down through A5:

=index($Y$1:$Y$50, rank(Z1, $Z$1:$Z$50))

If you do not like the fact that the values change every time you
modify the worksheet (argh!), copy-and-paste-special-value the random
values in Z1:Z50.


All times are GMT +1. The time now is 10:39 PM.

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