Home > OS >  Determine Win or Loss of each game and record to that teams list
Determine Win or Loss of each game and record to that teams list

Time:07-31

I have all my other formulas figured out but I'm stuck on 1 particular that actually produces the W or L.

enter image description here

=LET(rGames;A$1:F$10;rScores;FILTER(FILTER(rGames;(FILTER(rGames;{1\0\0\0\0\0})=H2) (FILTER(rGames;{0\0\1\0\0\0})=H2));{1\0\1\0\1\1});TRANSPOSE(BYROW(rScores;LAMBDA(rowGame;IF((INDEX(rowGame;1;1)=H2)*(INDEX(rowGame;1;3)>INDEX(rowGame;1;4)) (INDEX(rowGame;1;2)=H2)*(INDEX(rowGame;1;3)<INDEX(rowGame;1;4));"W";"L")))))

The formulae will calculate and spill W & L for the Team given in the respective cells in column H. The order is according to the games plan from top to bottom. For error handling (e.g. missing results of open games) you can adjust the IF clause accordingly.

Edit: due to regional settings might want to replace ; and \ with ,

Edit2: put an “o” when one of the result cells is empty (per match)

=LET(rGames;A$1:F$10;rTeams;H$2:H$5;rScores;FILTER(FILTER(rGames;(FILTER(rGames;{1\0\0\0\0\0})=H2) (FILTER(rGames;{0\0\1\0\0\0})=H2));{1\0\1\0\1\1});rowWL;TRANSPOSE(BYROW(rScores;LAMBDA(rowGame;IF(ISBLANK(INDEX(rowGame;1;3)) ISBLANK(INDEX(rowGame;1;4));"o";IF((INDEX(rowGame;1;1)=H2)*(INDEX(rowGame;1;3)>INDEX(rowGame;1;4)) (INDEX(rowGame;1;2)=H2)*(INDEX(rowGame;1;3)<INDEX(rowGame;1;4));"W";"L"))))); rowWL)
  • Related