View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default League table automatic sort/update

Assuming the data is in A1:E20

Put the teams in J2:Jn, FR1 in K1, Fr2 in K2, etc., then in K2

=SUMPRODUCT(--($A$1:$A$20=$J2),--($E$1:$E$20=K$1),--($B$1:$B$20$C$1:$C$20))
+
SUMPRODUCT(--($D$1:$D$20=$J2),--($E$1:$E$20=K$1),--($B$1:$B$20<$C$1:$C$20))+
SUMPRODUCT(--($A$1:$A$20=$J2),--($E$1:$E$20=K$1),--($B$1:$B$20=$C$1:$C$20))/
2

copy down and across

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"RedHook" wrote in message
oups.com...
Thanks for all your help so far, the problem with being new to this
stuff is figuring out how to use all the available information. I have
one more query as described below, then I'll be ready to go and have a
good play with all this stuff !

I'd like to implements a match results table as shown below

TeamA ScA ScB TeamB MatchID
Germany 2 1 Costa Rica FR1
Poland 2 2 Ecuador FR1
England 3 1 Paraguay FR1
Germany 4 2 Ecuador FR2
Costa Rica 1 1 Poland FR2

As the results table above is updated I'd like to summarize the
results for each team in another worksheet/table. Basically for each
match teams is assigned 1 point for a win, 0.5 points for a draw and 0
points if they lose a match. For the example results table the summary
table would look like this:

Team FR1 FR2 FR3
Costa Rica 0 0.5
Germany 1 1
Ecuador 0.5 0
England 1
Poland 0.5 0.5

Is this something that can be done with formulas or would it be easier
to write some VBA code in response to changes in the original match
results table.

Thx
RH