Forum Discussion
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.
Please suggest.
Thank you in advance!
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
- Ramiz_AssafIron Contributor
I thought you needed the serial number from the original list. That is why I proposed my solution.
You needed something simpler.
Best of luck
- shekharreddyCopper ContributorYeah, You are correct. I just realized.. I'm sorry it's my mistake.. could you please help me to get serial number from original series.. then only the sample works..
- TheAntonyIron Contributor
- Ramiz_AssafIron Contributor
can you elaborate more, can you provide an example excel sheet (not the original) but something similar so we can understand your problem better.
- shekharreddyCopper Contributor
- Ramiz_AssafIron Contributor
It is hard to automate without VBA
so please find a simple solution without programming or formulas