Conditional Random Sampling

rizzcombat

New Member
Joined
Feb 22, 2016
Messages
5
I have a single document that has individuals personal information (first name, last name, demographics, etc) listed as the headers in the first column. One of the demographics is which state they're affiliated with. Each individual has a column with their states 2 letter abbreviation associated with them.


I need to create a random of 50% for each state, individually. In other words if Nevada as 200 individuals and Utah has 500 individuals, I'd need to randomly select 100 and 250 from each list, respectably. Obviously I know I could break the file up into 50 different sample groups, then recombine, but I wasn't sure if there was a way to achieve this sampling.

Any suggestions how to do this easily?
 
Welcome to the MrExcel forum!

First, it's better to open a new thread with a question rather than append to one that's 6 years old. I am an old-timer so you're lucky, but more than likely no one will see it.

Next, some people can't or won't download files from the internet for security reasons. I'm one of those, so I'm sorry I can't see your spreadsheet. There is a tool here called XL2BB (see a link in my signature or the reply box) which shows you how to get it. It lets you show a representative sample of your data in a manner that makes it easy for the helpers here to copy your data to a test workbook. It's easy to download, install, and use.

So if you can show a sample, it looks like you'll need to show samples of 2 sheets, I'll gladly take a look. If not, then please open a new thread with your question. There are some people here who will download files, and one of them will probably take a look.
Thanks man, I'll make a new post. I was able to fix a couple of things in my code but still need it to do something else
 
Upvote 0

Forum statistics

Threads
1,226,797
Messages
6,193,051
Members
453,772
Latest member
aastupin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top