Randomly selecting within a filter

ScottBeatty

Registered User.
Local time
Today, 08:15
Joined
May 31, 2013
Messages
65
I have a scenario that I tried on an Excel forum but didn't have much luck.

Conditions for my assignment:
1) Long description short, I have to randomly select 2 records for each client each month.

2) The catch is that these records have to be different states until the process is done for all 50 states, so the process isn't done for 4 years and 2 months (50 months).

I attached a sample database. Any help, comments, suggestions, ANTHING would be MUCH appreciated. Thank you!

Scott
 

Attachments

2) The catch is that these records have to be different states until the process is done for all 50 states, so the process isn't done for 4 years and 2 months (50 months).
What do you mean (and what should happen after the 50 months)?
It is easy to extract 2 random record per. client per. months, but do you want to save the result so that these 2 record is not included in the pool for the next drawing or ...?
Could you from the data in the database, show which result you want to get?
 
Yes exactly. I don't want there to be duplicates of a state until all 50 states are randomly selected.

I want the there to be 2 random states for every 1 client. I want that process to be repeated 25 times so that all 50 states are selected. The comment about the 50 months was irrelevant and also incorrect; that was just to provide some real-life information to my question. That is more for the database user to keep track of.
 
I have made a small example for you in the attached database.
Open the form "RandomRecords" and click the button.
The 2 random selected state per client per run, are stored in table "AlReadyDraw".
If you want to start from new then delete the records in "AlReadyDraw".
 

Attachments

Users who are viewing this thread

Back
Top Bottom