= LET( comma, ", ",
sumHomePts, SUMIFS(HomePts,HomeTeam,Team),
sumAwayPts, SUMIFS(AwayPts,AwayTeam,Team),
points, sumHomePts + sumAwayPts,
max, MAX(points),
min, MIN(points),
topTeam, TEXTJOIN(comma,,FILTER(Team, points=max)),
bottomTeam, TEXTJOIN(comma,,FILTER(Team, points=min)),
CHOOSE({1,2;3,4}, topTeam, max, bottomTeam, min) )