View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 141
Default Generate Random Groupings from List

thats how I am doing that, using an if statement on number of rows then
decide how many to put in each group

it would be nice to set it for example if there are 19 people 2 groups of 6
and 1 of 7, but this will do exactly what I need to do as I can copy from one
list to another to correct

"merjet" wrote:

so fr example if I wanted 2 groups of 6 (in the case of 12 people I would
change

For ict=0 to 3

to For ict= 0 to 1

just not sure how to make it get 6 rows only


That correct for the loop. To get 6 rows change the 5's to 6's:
ws1.Range(Cells(6 * iCt + 1, 1), Cells(6 * iCt + 6, 1)).Copy _
Destination:=ws1.Cells(1, 6 + 4 * iCt)

Maybe earlier in the code you should put some Select Case Statements
to calculate the number of groups and number of names in each based on
the total number of names.

Hth,
Merjet