# Count times user won where user is in team

I have a list of teams with a list of players next to it

(Would it be better/easier if the players are in a single cell?)

``````+Team Name+--------+--------+
|  Team 1 |Player 1|Player 2|
|  Team 2 |Player 3|Player 4|
|  Team 3 |Player 1|Player 3|
|  Team 4 |Player 2|Player 4|
+---------+--------+--------+
``````

Then I have a list of games with what team played against what team and who won

``````+------+------+------+--WON-+
|Game 1|Team 1|Team 2|Team 1|
|Game 2|Team 3|Team 4|Team 4|
+------+------+------+------+
``````

I'd like count how many times a specific player has won and how many times he has played

``````+--------+#wins+#plays+
|Player 1|   1 |    2 |
|Player 2|   2 |    2 |
|Player 3|   0 |    2 |
|Player 4|   2 |    2 |
+--------+-----+------+
``````
``````        List of teams   Specific player
v       v
``````

Using `=COUNTIF(H2:U999; A2)` does not work if a team composition is reoccurring

I don't know if it's matters but it's a online google spreadsheet

## migrated from superuser.comJan 28 '18 at 11:09

This question came from our site for computer enthusiasts and power users.

• In last screen shot you have list of Players who played and Wins and your Question is, "count how many times a specific player has won and how many times he has played" !! – Rajesh S Jan 28 '18 at 9:57
• Better Post the Link of Google Sheet. – Rajesh S Jan 28 '18 at 9:57

• Yes, just insert new team and player in `TEAM` table and add new game, and then copy the formula down at `GAMES` and `PLAYER` tables. Don't forget to check and modify the reference range for `VLOOKUP` and `COUNTIF` . I just made some modification in the example table (in Google Drive) to show what I mean. Check it out. – Sofyan Thayf Jan 29 '18 at 0:51