Calculation Issues

Calculate Sortable Sports Standings with Goals For and Against in Excel

Tauseeq MagsiTauseeq Magsi Nov 12, 2026 869 views

Question details

Create sports standings that remain accurate after sorting by calculating each team's statistics from a normalized game-results table.

Calculate Sortable Sports Standings with Goals For and Against in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to track home and away game scores, calculate team goals, wins, and points, and sort the standings in any order.
Observed behavior
Hard-coded cell references can return incorrect standings values after the standings table is sorted.
Before you start

Enter every match only once in a game-results table, with separate columns for the home team, away team, home score, and away score. Use consistent team names in every row so SUMIFS criteria can match them correctly.

Solution 1Recommended

Build standings from a normalized game-results table

Use this method to calculate sortable standings without formulas depending on a team's current row position.

Keep match data separate from the standings table. The standings table should contain one row per team and use team names as the criteria for all calculations, so sorting the standings does not change the results.

1
Create the game-results table

On a Results worksheet, create columns named Home Team, Away Team, Home Goals, and Away Goals. Select the data range and choose Insert > Table, then name the table Games from the Table Design tab.

2
Create a team list for standings

On a Standings worksheet, add a Team column with each team listed once. If you have Microsoft 365, enter =SORT(UNIQUE(VSTACK(Games[Home Team],Games[Away Team]))) in the first team cell; otherwise, copy both team columns to a single list and use Data > Remove Duplicates.

3
Calculate Goals For

Add a Goals For column. For the team in A2, enter =SUMIFS(Games[Home Goals],Games[Home Team],A2)+SUMIFS(Games[Away Goals],Games[Away Team],A2), then fill the formula down.

4
Calculate Goals Against

Add a Goals Against column. For the team in A2, enter =SUMIFS(Games[Away Goals],Games[Home Team],A2)+SUMIFS(Games[Home Goals],Games[Away Team],A2), then fill down.

5
Sort the completed standings

Add the remaining statistics, then select the entire standings table and use Data > Sort. Sort by Points from Largest to Smallest and add a second level such as goal difference if your competition uses it.

Build standings from a normalized game-results table
Sorting remains safe: Because each formula uses the team name in its own standings row, you can sort the standings table without breaking the calculations.
WPS Spreadsheets

Create Sortable Sports Standings in WPS Spreadsheets

WPS Spreadsheets lets you organize match results in a structured table and use SUMIFS formulas to calculate goals, wins, and points for a standings table that can be sorted safely.

  1. 1. Set up the match-results columns: In WPS Spreadsheets, create columns for Home Team, Away Team, Home Goals, and Away Goals, then enter one match per row.
  2. 2. Create the standings team list: On a separate sheet, add one unique team name per row in the Team column of the standings table.
  3. 3. Enter SUMIFS standings formulas: Use SUMIFS formulas to total home and away goals separately for each team, then add the two totals for Goals For and Goals Against.
  4. 4. Calculate points and sort the table: Add win and point formulas, select the standings range, and choose Data > Sort to rank teams by Points in descending order.
Use SUMIFS to calculate Goals For and Goals Against from home and away match records.Sort standings by points, wins, goal difference, or other league tie-breakers.Open, edit, and save Microsoft Excel .xlsx sports standings files.Use a familiar spreadsheet interface for an easy transition from Excel.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my standings formulas change after I sort the table?

This usually happens when formulas refer to fixed cells or nearby rows instead of the team name. Store games in a separate results table and use SUMIFS with the standings Team cell as the criterion.

How do I calculate Goals For when a team can play home or away?

Add the team's Home Goals when it appears in the Home Team column, then add its Away Goals when it appears in the Away Team column. For example: =SUMIFS(Games[Home Goals],Games[Home Team],A2)+SUMIFS(Games[Away Goals],Games[Away Team],A2).

How do I calculate Goals Against for each team?

Sum Away Goals where the team is the home team, then sum Home Goals where it is the away team. For example: =SUMIFS(Games[Away Goals],Games[Home Team],A2)+SUMIFS(Games[Home Goals],Games[Away Team],A2).

Can I calculate league points without manually updating every team?

Yes. Add Home Points and Away Points helper columns to the game-results table, then use SUMIFS to total both columns for each team in the standings table.

What is the best way to sort a sports standings table?

Select the entire standings table and use Data > Sort. Sort first by Points descending, then add tie-breaker levels such as Wins, Goal Difference, or Goals For according to your league rules.