View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud Bill Renaud is offline
external usenet poster
 
Posts: 417
Default A little variation of conventional sorting

I think there might be a problem in the recursion with this routine, as the
recursion does not end correctly. It produces the following error:

"Run-time error '457' This key is already associated with an element of
this collection".

I believe the line...

gColl.Add i1, Format(i1)

....in the GroupNth routine is attempting to add an element again (on a
recursive call) when the element is already in the collection (from a
previous call back up the chain somewhere).

Try the following data set (3 nodes connected in a single group in a loop
back to each other):

101,102
102,103
103,101

This might actually occur in a computer network that has redundant
connections for reliability.

--
Regards,
Bill Renaud