Function Problems

Count Matching Players and Winning Teams in Excel

Huma Ashraf ChHuma Ashraf Ch Nov 18, 2026 870 views

Question details

Count the weeks when two players were both assigned to the red team and red was also the winning team.

Count Weeks When Two Players and the Winning Team Match in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Player assignments and winning teams are stored across week columns, with the winner range potentially offset from the player ranges.
Observed behavior
The desired result is a count of weeks in which both player assignments and the corresponding winner are Red.
Before you start

Identify the rows containing the two players and the winning team. Check which winner column corresponds to each player week, especially if the winner data starts in a different column.

Solution 1Recommended

Use COUNTIFS to Match Both Players and the Winner

Count weeks where all three corresponding cells contain Red, including cases where the winner range is offset.

1
Check the week alignment

On Sheet2, identify the first and last week columns for both player rows and the corresponding winner row. For the example below, player data runs from A to AA, while the matching winner data runs from B to AB.

2
Enter the formula

Select an empty cell and enter =COUNTIFS(Sheet2!A$3:AA$3,"Red",Sheet2!A4:AA4,"Red",Sheet2!B$30:AB$30,"Red"). Press Enter to return the count.

3
Adjust the ranges

Replace the sheet name, row numbers, and column endpoints with those in your workbook. Keep all three ranges the same size, and make sure their first cells represent the same week.

Use COUNTIFS to Match Both Players and the Winner
If the winner columns are not offset: Use the same week columns for all three ranges. For example, if the winner is in row 30 and aligns with columns A through AA, use Sheet2!A$30:AA$30 as the winner range.
Count matching teams in WPS Spreadsheet

Count Matching Player and Winner Weeks in WPS Spreadsheet

Open your workbook in WPS Spreadsheet and use COUNTIFS to compare both player rows with the corresponding winning-team row.

  1. 1. Open the workbook: In WPS Spreadsheet, select Open and choose your Excel workbook.
  2. 2. Check matching weeks: Open Sheet2 and identify the two player rows and the winner row. Confirm which columns represent the same weeks.
  3. 3. Enter COUNTIFS: Select an empty cell and enter =COUNTIFS(Sheet2!A$3:AA$3,"Red",Sheet2!A4:AA4,"Red",Sheet2!B$30:AB$30,"Red"). Adjust the ranges to match your workbook and press Enter.
  4. 4. Review the result: Compare the count with a few week columns on Sheet2 to confirm that the winner range is aligned with the player ranges.
Count weeks that meet all three team conditionsWorks with Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet formula interfaceEdit and save spreadsheets with free WPS Office
microsoft office alternative - wps office

Frequently Asked Questions

Why must the COUNTIFS ranges be the same size?

COUNTIFS compares corresponding positions in each range, so each range must have the same number of rows and columns. Check the start and end columns in the formula if Excel reports an error.

How do I count a different winning team?

Replace each "Red" criterion in the formula with the team name you want to count, such as "Blue". All three criteria should match if both players and the winner must be on that team.

What if the winning team is in the same week columns as the players?

Use the same column span for the winner range. For example, replace Sheet2!B$30:AB$30 with Sheet2!A$30:AA$30 when the winner data aligns with player columns A through AA.

Can the formula use a team name from a cell?

Yes. Enter the team name in a cell, such as C1, and replace each "Red" criterion with $C$1. Changing C1 will then change the team being counted.