I've attached a simple graphic of my algorithm to this post.
It's not the easiest thing to work out/comprehend, but it will work. I worked it out a bunch of different ways and it works out fine every time. The graphics uses a small dataset (23 teams) but I just wanted to illustrate the way to work it, and some of the problems that might arise from using it.
If there are any questions/comments please PM me or post here or something...
I'm sure this would be easy to work into a program of sorts (using linked lists or arrays), but I'm simply too lazy to worry about doing it in VB or C.
[edit: forgot the file...]