PDA

View Full Version : Randomize blocks of range by column



Anyse
12-21-2011, 02:50 PM
Hello everyone,

I am struggling with the following issue: I have the following (database) range of data stored in excel, and the values for each of the 5 variables appear in labels of a userform (by row - through a command button). My stimuli do not have the same length (and I have more than two in the real project). Example of my range is the following:

Stimuli Sub-stimuli Label1 Label2 Label3
1.................1..............a..........b1........x
1.................2..............a..........b2........x
1.................3..............a..........b3........x
2.................1..............c..........d1........y
2.................2..............c..........d2........y
2.................3..............c..........d3........y
2.................4..............c..........d4........y


Each time I initialize the userform (new user), I would to have a random order of appearance of the "Stimuli", eg. the entire block of stimuli 2 appears first (with no repetition), but the rest does not change order of appearance:

Stimuli Sub-stimuli Label1 Label2 Label3
2.................1..............c..........d1........y
2.................2..............c..........d2........y
2.................3..............c..........d3........y
2.................4..............c..........d4........y
1.................1..............a..........b1........x
1.................2..............a..........b2........x
1.................3..............a..........b3........x

And I would like to have a variable that records the new order of appearance of the stimuli, compared to the original range.

How can I do this?

Thanks a lot in advance.