bigjim said:
There will not always be five per team or even
six teams as this will vary, but if I can it to work
for this case I can make it work with the others.
Not necessarily. If you are not clear about your input and output
requirements, you are likely to get a solution that works for the special
case that you mentioned, but it is difficult to generalize.
Mike H said:
Select the 2 columns and sort on column B and
the names will be randomley grouped.
[....]
I've got that done, but my problem is the new list
that is sorted has names and blanks interspersed
throughout the list.
I don't understand why. You said: "I have a list of 50 people out of which
I have selected 30 names". The reasonable inference is that the 30 names are
in 30 contiguous cells. I am sure that is what MikeH assumed. Is that not
the case?
If it is not the case, can you make it so easily?
If so, then MikeH's solution is probably the simplest to explain, if that
works for you. I would only add that in column C, I would enter the names of
each team repeated in contiguous cells as many times as the number of team
members for each team. You can add that after sorting. If you do it before
sorting, be sure to select only columns A and B (the names and the random
numbers) for the sort.
However, you are posting to the "Excel Programming" forum. That is usually
used for VBA questions (macros and UDFs), although the distinctions among
forums have blurred over the years. Are you looking for an Excel solution or
VBA solution, or don't you care?
Moreover, MikeH's approach can be tedious if you want a process that you can
repeat often or for many sets of 30 people. Are you looking for a less
labor-intensive approach?
----- original message -----
bigjim said:
I've got that done, but my problem is the new list that is sorted has names
and blanks interspersed throughout the list. I need to know how to select
the first five for team 1, the 2nd for team 2, etc. There will not always
be five per team or even six teams as this will vary, but if I can it to work
for this case I can make it work with the others. Sorry I wasn't clear on my
question.
Jim