ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Random selection of items from a group (AQL sampling) (https://www.excelbanter.com/excel-programming/296624-random-selection-items-group-aql-sampling.html)

ScottDL

Random selection of items from a group (AQL sampling)
 
Has anyone developed a formula for selecting random items from a group?

Given the size of the group "G" and the number of samples "S" required to be selected from it, I want to create an ordered list of randomly selected sequence numbers from G up to the total number of S with each selection being excluded from subsequent selections. (Just like picking numbered ping-pong balls from a bag, once selected that number is no longer available to be selected.

Example: I have a group size of 100 units. I want to randomly select 10 units from the sequence of 1-100. The output I want might be something like


1
2
2
3
6
7
7
8
9

This would be a supposedly random selection of 10 unique sequence numbers from the group of 100 units

If anyone has a solution, please let me know

Thanks,
Scott

Tom Ogilvy

Random selection of items from a group (AQL sampling)
 
put the numbers 1 to 100 in A1:A100
in B1 put in
=rand()
drag fill down to B100
Select A1:B100 and sort on column B.

Select A1:A10 and sort again on column A.

Those are you 10 balls.

--
Regards,
Tom Ogilvy
"ScottDL" wrote in message
...
Has anyone developed a formula for selecting random items from a group?

Given the size of the group "G" and the number of samples "S" required to

be selected from it, I want to create an ordered list of randomly selected
sequence numbers from G up to the total number of S with each selection
being excluded from subsequent selections. (Just like picking numbered
ping-pong balls from a bag, once selected that number is no longer available
to be selected.)

Example: I have a group size of 100 units. I want to randomly select 10

units from the sequence of 1-100. The output I want might be something
like:

2
14
23
27
34
67
78
79
85
98

This would be a supposedly random selection of 10 unique sequence numbers

from the group of 100 units.

If anyone has a solution, please let me know.

Thanks,
Scott





All times are GMT +1. The time now is 05:02 AM.

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