Bengaluru, IN

Welcome to the Bengaluru User Group

Click in the JOIN GROUP button in Home to follow our news and attend our events!

Random sampling macro

Dayanand
5 - Atom

Iam looking for random sampling selection for one table set based on criteria from other table. Below is just a sample data where we select sample of 50 samples out of 20000 ids available in system where we could have a repetitive Name, Rating, Dept

 

Based on below total population, I have 1 sample each from Sales(High) and Sales(Medium) to be picked on random basis.

1. If random tool picks Dan(High) from CA, then name Dan, state CA and rating High then the next pick should go to Joy(Medium) with state AU. Now state CA, AU should be given second priority as they are already picked in first 2 samples.

2. Marketing(Low). As state CA and AU are already covered in above sample, now row8-Ross should be second priority and next sample should be either from Row9-Peter or Row#15-John.

 

This is how the final sample should be picked up basis which should cover maximum states, Rating and Dept as per sample with unique Name(No repeat). Sample must be picked on random basis only

 

Total Population

ID
StateDeptRatingName
1CASalesHighDan
2CASalesMediumDan
3CASalesLowDan
4CASalesHighDan
5AUSalesHighJoy
6AUSalesMediumJoy
7AUMarketingHighRoss
8AUMarketingLowRoss
9TXMarketingLowPeter
10CACollectionHighAudrey
11CACollectionMediumAudrey
12AUSalesMediumJoy
13INCollectionHighJack
14BJAuditLowAudrey
15ARMarketingLowJohn
16ARCollectionHighBob
17FRCollectionLowAlice

 

Sample Size to be picked.

 

DeptRatingNo of samples to be picked
SalesHigh1
SalesMedium1
MarketingLow1
CollectionHigh1
 
 
 
0 REPLIES 0