Forum Discussion

shekharreddy's avatar
shekharreddy
Copper Contributor
Jul 31, 2020
Solved

Sampling category wise percent

Hello,

I have few comments in my work and I need to take samples from those comments percentage wise.

Example: comments: 1. New Company, 2. Updated File, 3. Checked. 4. All Good

The total comments are 1000( NOT 1000/4 it may be any number). Now I want percentage wise samples like 1. New Company (30%), 2. Updated File,(20%) 3. Checked(35%). 4. All Good(15%) total should be 100%. let's say New company's are 100 and i want 30% means 30 records so sample must contain 30 records from New company remaining also same.

I tried Data analysis-> sampling , Random number generation and Rand in excel

I am getting random samples but not in required percentage.

mathetes 

peteryac60 

 

Please suggest.

 

Thank you in advance!

 

 

 

 

 

  • TheAntony's avatar
    TheAntony
    Aug 01, 2020

    shekharreddy , VBA not necessary. See attached with both the new Dynamic Array and old Legacy formula options.

     

    Also, your Sample counts don't evaluate to whole numbers, so I had to round them. This makes the sample size 22 instead of 23. FYI...

11 Replies

Resources