S
Slim Slender
I need help. I have several hundred records representing transactions
within a particular month. I want to select two random samples for
each client for each day of the month. In other words, select random
samples based on two conditions or criteria. One problem I have
encountered is when there are no examples for a client for a
particular day I get an error. I think the pseudo-code or algorithm
might go a little something like this . . . swing it boys.
Create a collection of dates
Create a collection of names
Create an array to hold records
For the first date
For the first name
For records 1 to infinity
Select a random record
Test for duplication
Add to array
Loop
Write array of records to another sheet
Next name
Next date
I already have some chunks of the code but it doesn’t work as a whole
because I think I have the order of execution wrong. Any help would be
appreciated.
within a particular month. I want to select two random samples for
each client for each day of the month. In other words, select random
samples based on two conditions or criteria. One problem I have
encountered is when there are no examples for a client for a
particular day I get an error. I think the pseudo-code or algorithm
might go a little something like this . . . swing it boys.
Create a collection of dates
Create a collection of names
Create an array to hold records
For the first date
For the first name
For records 1 to infinity
Select a random record
Test for duplication
Add to array
Loop
Write array of records to another sheet
Next name
Next date
I already have some chunks of the code but it doesn’t work as a whole
because I think I have the order of execution wrong. Any help would be
appreciated.