ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Projects
  3. How to Make a League Table in Excel That Ranks Itself

How to Make a League Table in Excel That Ranks Itself

By ExcelReady Team·Updated November 3, 2026·7 min read

The short answer

To make a league table in Excel, enter each match as one row with both teams and scores, then add a Winner column. Count played, won and drawn games with COUNTIF and COUNTIFS, add goals with SUMIFS, and work out points as 3 × wins + draws. SORTBY then ranks the table by points and goal difference.

Key takeaways

  • Keep one row per match. Every number in the table is calculated from that list.
  • A Winner column, =IF(C2>D2,A2,IF(D2>C2,B2,"Draw")), makes wins and draws easy to count.
  • A team plays at home and away, so most columns add a home formula and an away formula.
  • SORTBY with points, then goal difference, then goals for gives a table that re-sorts itself.
  • COUNTIF plus COUNTIFS gives a position number with tie-breaks, and it works in older Excel.
On this page+
  1. Step 1: Enter the results, one row per match
  2. Step 2: Set up the league table
  3. Step 3: Count played, won, drawn and lost with COUNTIFS
  4. Step 4: Add goals and points with SUMIFS
  5. Step 5: Rank the table automatically with SORTBY
  6. How to keep the table up to date
  7. Add a position column that breaks ties
  8. Practise it

A league table in Excel that ranks itself needs two parts: a list of match results, and a summary table that counts and sorts everything from that list. Type a new score and the points, goal difference and positions all update. This guide builds one for a small four-team football league, step by step, but the same method works for five-a-side, netball, office quiz leagues or a sales contest.

Step 1: Enter the results, one row per match#

Start with a results list where each row is one match. Put it in A1:E7:

ABCDE
1HomeAwayHome goalsAway goalsWinner
2LionsTigers21Lions
3BearsWolves00Draw
4TigersBears31Tigers
5WolvesLions11Draw
6LionsBears20Lions
7TigersWolves02Wolves

The Winner column is a formula, so you only type the teams and scores. In E2, fill down:

Excel formula
=IF(C2>D2,A2,IF(D2>C2,B2,"Draw"))

If the home side scored more, it returns the home team. If the away side scored more, the away team. Otherwise "Draw". This one helper column makes the counting much simpler, because COUNTIFS can't compare two columns with each other directly.

Step 2: Set up the league table#

Put the summary table to the right, starting in G1, with one row per team and these headers:

GHIJKLMNO
TeamPWDLGFGAGDPts

P is played, W won, D drawn, L lost, GF goals for, GA goals against, GD goal difference and Pts points. Type the team names in G2:G5: Lions, Tigers, Bears, Wolves. Every other cell is a formula that you write once in row 2 and fill down. The $ signs lock the results ranges so they don't move as you fill.

Step 3: Count played, won, drawn and lost with COUNTIFS#

A team plays some games at home and some away, so most counts add two parts.

Played (H2):

Excel formula
=COUNTIF($A$2:$A$7,G2)+COUNTIF($B$2:$B$7,G2)

Won (I2):

Excel formula
=COUNTIF($E$2:$E$7,G2)

Drawn (J2):

Excel formula
=COUNTIFS($A$2:$A$7,G2,$E$2:$E$7,"Draw")+COUNTIFS($B$2:$B$7,G2,$E$2:$E$7,"Draw")

Lost (K2): =H2-I2-J2. Every game is a win, a draw or a loss, so subtraction is safer than another count.

COUNTIFS counts rows where every condition is true, here "the team was at home" and "the result was a draw". The COUNTIFS and SUMIFS guide explains multi-condition counts in more depth, and the COUNTIFS function guide covers the syntax.

Step 4: Add goals and points with SUMIFS#

Goals use the same home-plus-away idea with SUMIFS, which adds the numbers in rows that match.

Goals for (L2): home goals when at home, plus away goals when away.

Excel formula
=SUMIFS($C$2:$C$7,$A$2:$A$7,G2)+SUMIFS($D$2:$D$7,$B$2:$B$7,G2)

Goals against (M2): the other column each time.

Excel formula
=SUMIFS($D$2:$D$7,$A$2:$A$7,G2)+SUMIFS($C$2:$C$7,$B$2:$B$7,G2)

Goal difference (N2): =L2-M2

Points (O2): =3*I2+J2, three for a win and one for a draw.

Fill row 2 down to row 5 and you get the full table, still in the order you typed the teams:

TeamPWDLGFGAGDPts
Lions32105237
Tigers310245-13
Bears301215-41
Wolves31203125

Two quick checks catch most mistakes: total goals for must equal total goals against (13 each here), and total wins must equal total losses (4 each). The SUMIFS function guide has more examples.

Step 5: Rank the table automatically with SORTBY#

SORTBY returns the table sorted by one or more columns, and it re-sorts every time a result changes. In an empty area, such as G8, type:

Excel formula
=SORTBY(G2:O5,O2:O5,-1,N2:N5,-1,L2:L5,-1)

This sorts by points (highest first), then goal difference, then goals for. The -1 means descending. The result spills into nine columns and four rows: Lions 7 points, Wolves 5, Tigers 3, Bears 1. Copy the headers above it and you have a live league table.

You can also use SORT with column numbers: =SORT(G2:O5,{9,8,6},{-1,-1,-1}) sorts by the 9th, 8th and 6th columns of the range. SORT and SORTBY need Excel 2021 or Microsoft 365. The SORT function guide and the comparison of SORT vs SORTBY explain the difference. In older Excel, select the table and use Data > Sort with three levels, as shown in sorting by multiple columns, but you'll need to sort again after each result.

How to keep the table up to date#

The table only stays automatic if new results land inside the ranges the formulas use. Two simple habits make that safe:

  • Format the results as an Excel table. Click inside the results and press Ctrl+T (Mac: ⌘T). Use structured references such as Results[Home] in the formulas, and every new row is picked up on its own.
  • Or make the ranges longer than you need. $A$2:$A$200 leaves room for a full season. Empty rows don't change any count or total.

Enter fixtures before they're played with blank scores, and the Winner formula would call them a draw. Wrap it to leave unplayed games empty: =IF(C2="","",IF(C2>D2,A2,IF(D2>C2,B2,"Draw"))). Use C2="" rather than ISBLANK so the test still works if the scores are formulas.

Add a position column that breaks ties#

A position number is useful when you want the table to stay in its original order, or for older Excel. In P2, fill down:

Excel formula
=COUNTIF($O$2:$O$5,">"&O2)+COUNTIFS($O$2:$O$5,O2,$N$2:$N$5,">"&N2)+1

The first part counts teams with more points. The second counts teams with the same points but a better goal difference. Add 1 and you have the position: Lions 1, Wolves 2, Tigers 3, Bears 4. Plain RANK.EQ would give tied teams the same position, as the RANK function guide explains.

Tie-break rules differ between competitions. Some use head-to-head results before goal difference, so check your league's rules and change the sort order to match. To show only the top teams, such as a top 3 for promotion, see how to build a top N list.

Practise it#

Try the exercise on this page: it calculates one team's points straight from the results, with no helper table. Then practise COUNTIFS and SUMIFS in a live spreadsheet and learn to sort tables with the SORT function, where every formula you type is checked instantly.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

How many points do the Lions have (3 for a win, 1 for a draw)? Click H2 and type =3*COUNTIF(E2:E7,"Lions")+COUNTIFS(A2:A7,"Lions",E2:E7,"Draw")+COUNTIFS(B2:B7,"Lions",E2:E7,"Draw"), then press Enter.

fx
ABCDEFGHI
1
Home
Away
Home goals
Away goals
Winner
2
Lions
Tigers
2
1
Lions
Lions points
3
Bears
Wolves
0
0
Draw
4
Tigers
Bears
3
1
Tigers
5
Wolves
Lions
1
1
Draw
6
Lions
Bears
2
0
Lions
7
Tigers
Wolves
0
2
Wolves
8
9
10

Tip: Wins: count Lions in the Winner column and multiply by 3. Draws: count draws where Lions were at home, plus draws where they were away.

Practise this in a lesson

LessonSORT: order data with a formulaSort a table by any column, ascending or descending, and combine SORT with FILTER and UNIQUE.LessonCOUNTIFS and SUMIFSCount and sum with several conditions at once, and learn why SUMIFS puts the sum range first.Function guideSORTSort a range with a formula using Excel's SORT. Sort by any column, highest first, or combined with FILTER. Includes a live exercise.Function guideCOUNTIFSCount rows that meet several conditions with COUNTIFS. Examples for text, number ranges and between-values, plus a live exercise.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.

Frequently asked questions

How do I make a football league table in Excel?

+

List every match with home team, away team and both scores, add a Winner column, then build a table with one row per team. Use COUNTIF and COUNTIFS for played, won and drawn, SUMIFS for goals, and points = 3 × wins + draws. Sort it with SORTBY.

How do I sort a league table by points and goal difference?

+

Use =SORTBY(table, points, -1, goal_difference, -1, goals_for, -1) in Excel 2021 or Microsoft 365. In older Excel, use Data > Sort with three levels in the same order.

How do I calculate goal difference in Excel?

+

Subtract goals against from goals for, such as =L2-M2. Goals for adds a team's home goals and away goals with two SUMIFS, and goals against does the same with the other team's scores.

Can I use the same table for other sports?

+

Yes. Change the points formula to match the rules, for example 2 points for a win, or add bonus points. The counting and sorting steps stay the same.

Sources

  • COUNTIFS function - Microsoft Support
  • SUMIFS function - Microsoft Support
  • SORTBY function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Step 1: Enter the results, one row per match
  2. Step 2: Set up the league table
  3. Step 3: Count played, won, drawn and lost with COUNTIFS
  4. Step 4: Add goals and points with SUMIFS
  5. Step 5: Rank the table automatically with SORTBY
  6. How to keep the table up to date
  7. Add a position column that breaks ties
  8. Practise it

Keep reading

Math· 6 min read

RANK Function in Excel: Rank Scores and Sales

RANK.EQ returns a number's position in a list. Write =RANK.EQ(B2,$B$2:$B$8) to rank the value in B2 against the whole column, with the largest value ranked 1. Add a third argument of 1 to rank smallest first. Tied values share a rank and the next rank is skipped. RANK does the same job and still works in every version of Excel.

Dynamic arrays· 6 min read

Sort by Multiple Columns in Excel (Formula and Menu)

To sort by multiple columns in Excel, go to Data > Sort, pick the first column in Sort by, then click Add Level and pick the second column in Then by. For a live result, use a formula instead: =SORTBY(A2:C9,A2:A9,1,C2:C9,-1) sorts by column A from A to Z, then by column C from largest to smallest.

Conditional math· 7 min read

COUNTIFS and SUMIFS: Multiple Conditions in Excel

COUNTIFS counts rows that meet several conditions, and SUMIFS adds numbers from those rows. Each condition is a pair: a range, then its criteria. A row counts only if it matches every pair. SUMIFS puts the sum range first: =SUMIFS(E2:E9,A2:A9,"North",C2:C9,"Laptop") totals North laptop revenue.

More on projects

  • Build an Employee Leave Tracker in Excel
  • Build a Loan Amortization Schedule in Excel
  • Build a Maintenance Schedule in Excel With Due Dates
  • How to Build a Merit Increase Matrix in Excel
  • Mileage Log in Excel: Track Trips and Reimbursements
  • Build a Monthly Budget in Excel
All projects articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free