View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Helmut Meukel Helmut Meukel is offline
external usenet poster
 
Posts: 49
Default Equal list values.

After more thinking a came up with annother way to do it:
Sort the list as Jacob suggested, then assign the members
to the two groups (say group A and group B)
first to A
second to B
third to B
forth to A
fifth to A
sixth to B
.... and so on. To write code to do this is easy.

Depending on the actual values, the approach I first
suggested or this may get you the better distribution.
So how about programming and running both and
select the actually better?

The results would by no means be the "best", but you could
add more optimizing by swapping member between the groups
to minimize the remaining difference.
Of course these additional otimizations or other approaches
may minimize the difference between the group sums better,
however increase the difference in the number of group
members or the distribution of members with high, medium,
and low 'scores' between both groups.

Helmut.

"Helmut Meukel" schrieb im Newsbeitrag
...
Darren,

reading your OP and replies, I assume the number of team members
should be equal too. Yes?

If you have an even total number of team members it's easy:
Sort the list, then put the highest and the lowest into group A
and the second highest and the second lowest into group B
Repeat this until the not jet assigned is <4. If there are 2 unassigned,
sum up both groups and assign accordingly.

Helmut.


"Darren" schrieb im Newsbeitrag
...
Sorry for so many replies. What I can't do is generate the lists manually.
Straight away I'd be accused of 'team fixing'. I need the teams to be as
equal as possible but randomly generated. That way, if there's a query, I can
show that I had no input in the lists.

"Darren" wrote:

Doing it as I presume you mean I have 2 totals. The values are 52,898 and
52,488. As you can see there is a considerable difference between the 2. I
want them to be as close as possible to eachother.

"Darren" wrote:

Thanks for the reply Jacob. The problem I have is that the actual list is
over 200 names. The sort bit I can do (highest to lowest). When you say
assign subsequent rows, do you mean manually drag every other name and
number
to 2 new column sets? I was really hoping for something that would do this
for me. The list of names isn't constant. it changes from month to month,
as
do the values of column B

"Jacob Skaria" wrote:

Sort the list by ColB and assign subsequent rows to each set.

--
Jacob (MVP - Excel)


"Darren" wrote:

I have a list of names in column A with numerical values in column B

Example:
A B
Alan 1234
Darren 2433
Tammi 2055
Carol 1999
Rose 2001
Reese 2411

Is it possible to equally split the list into 2 columns so that the
number
totals (B) are the same (or as near as)?