Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help regarding random sampling
I have to develop a user-defined function that can
be used to do random sampling of one or more elements from a sampling frame listed in a range in Excel When two or more elements are sampled, the sampling needs to be done without replacement. How can i achieve this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help regarding random sampling
Look for 'help' on Randomize and rnd
like below: 'Returns a random number from one(1) to nine(9) Randomize Random19 = Int(9 * Rnd + 1) You will have to setup your own macro based on your sample. DanR "mecivil" wrote in message ... I have to develop a user-defined function that can be used to do random sampling of one or more elements from a sampling frame listed in a range in Excel When two or more elements are sampled, the sampling needs to be done without replacement. How can i achieve this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help regarding random sampling
In the simplest case, assume that all the elements are in a single column,
column A. If this is not true, then first move the elements to a single column. If column B enter: =RAND() and copy down as far as column A Sort both columns by column B. This will "shuffle" the elements in column A Then just get the top set of elements from column A: A1 thru A3 to sample three A1 thru A7 to sample 7 etc. -- Gary''s Student - gsnu200743 "mecivil" wrote: I have to develop a user-defined function that can be used to do random sampling of one or more elements from a sampling frame listed in a range in Excel When two or more elements are sampled, the sampling needs to be done without replacement. How can i achieve this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
random sampling | Excel Discussion (Misc queries) | |||
Random Sampling | Excel Discussion (Misc queries) | |||
Random Sampling - Please Help! | Excel Worksheet Functions | |||
Random Sampling | Excel Discussion (Misc queries) | |||
Random Sampling | Excel Discussion (Misc queries) |