Counting Wins And Losses

Daviboy30

New Member
Joined
Nov 7, 2021
Messages
33
Office Version
  1. 2019
Platform
  1. MacOS
I'm running a scoresheet for my league and I need to track each player's wins and losses record throughout the season, including the previous season, so that I can assign a proper player ranking. If a player wins or loses 7 out of 10 matches his ranking goes up or down, depending on how he (or she) does. Players often do not play every week, but I still need to track their wins and losses through multiple seasons. More often than not player ranking don't change because they don't meet the 7 out of ten threshold, but when they do, I want the spreadsheet to automatically post the new ranking.

In the attached Mini-sheet example Joe's ranking remained the same because over a period of 13 weeks he played 10 matches, but did not meet the 7 out of 10 wins or losses threshold. Meanwhile Jack's ranking went from 6 up to 7 because over a period of 15 weeks he played 10 matches and won 7 of them. In Mary's example, her ranking went down because over a period of 14 weeks she played 10 matches and lost 7 times. If a player rank goes up then the counting of wins and losses starts fresh.

The problem I'm having is how to automatically track a player's last 10 matches whether he plays the matches in 10 weeks, 10 months or even 10 years.

IFTestBook2.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
3PlayerCurrent RankCurrent WinsCurrent LossesNew Rank1/11/81/151/221/292/52/122/192/263/53/123/193/264/24/94/164/234/30
4Joe4654WWWLLWWLWWWLWL
5Jack6737WWLWWLWWLWW
6Mary3372LWLWLLLWWLLL
Sheet1
Cell Formulas
RangeFormula
C4C4=COUNTIF(K4:W4,"W")
D4:D5D4=COUNTIF(H4:W4,"L")
E4:E6E4=IF(C4>6, B4+1, IF(D4>6, B4-1, IF(B4=2, 2, IF(B4=3, 3, IF(B4=4, 4, IF(B4=5, 5, IF(B4=6, 6, IF(B4=7, 7))))))))
C5C5=COUNTIF(I5:W5,"W")
C6C6=COUNTIF(J6:W6,"W")
D6D6=COUNTIF(J6:W6,"L")
 

Attachments

  • Screen Shot 2021-11-07 at 4.52.18 PM.png
    Screen Shot 2021-11-07 at 4.52.18 PM.png
    99.1 KB · Views: 35

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Daviboy30,

The last 10 entries for Joe start 2/5 in column K so I think he has 4 losses and not 5.

I've not looked at your New Rank formula as I've assumed you just want to populate the Current Wins and Current Losses columns based on the last 10 results.

You don't say how many data columns there may be, just it could be 10 years of results, so I've taken it up to column XAA.

The AGGREGATE looks for the last 10 columns with results and returns that to the OFFSET which sets the range of the COUNTIF.

Daviboy30.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1
2
3PlayerCurrent RankCurrent WinsCurrent LossesNew Rank01-Jan-2108-Jan-2115-Jan-2122-Jan-2129-Jan-2105-Feb-2112-Feb-2119-Feb-2126-Feb-2105-Mar-2112-Mar-2119-Mar-2126-Mar-2102-Apr-2109-Apr-2116-Apr-2123-Apr-2130-Apr-21
4Joe4644WWWLLWWLWWWLWL
5Jack6737WWLWWLWWLWW
6Mary3372LWLWLLLWWLLL
Sheet1
Cell Formulas
RangeFormula
C4:C6C4=COUNTIF(OFFSET($E4,,AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10),,COLUMN($XAA$1)-AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10)),"W")
D4:D6D4=COUNTIF(OFFSET($E4,,AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10),,COLUMN($XAA$1)-AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10)),"L")
E4:E6E4=IF(C4>6, B4+1, IF(D4>6, B4-1, IF(B4=2, 2, IF(B4=3, 3, IF(B4=4, 4, IF(B4=5, 5, IF(B4=6, 6, IF(B4=7, 7))))))))
 
Last edited:
Upvote 0
Here is another option for looking at counts for the last 10 results. These also work if less than 10 results exist.

21 11 08.xlsm
ACDFGHIJKLMNOPQRSTUVWX
3PlayerCurrent WinsCurrent Losses1/11/81/151/221/292/52/122/192/263/53/123/193/264/24/94/164/234/30
4Joe64WWWLLWWLWWWLWL
5Jack73WWLWWLWWLWW
6Mary37LWLWLLLWWLLL
7Ann12LWL
WL
Cell Formulas
RangeFormula
C4:C7C4=LEN(RIGHT(CONCAT(F4:ZZ4),10))-LEN(SUBSTITUTE(RIGHT(CONCAT(F4:ZZ4),10),"W",""))
D4:D7D4=LEN(RIGHT(CONCAT(F4:ZZ4),10))-C4
 
Upvote 0
Hi Daviboy30,

The last 10 entries for Joe start 2/5 in column K so I think he has 4 losses and not 5.

I've not looked at your New Rank formula as I've assumed you just want to populate the Current Wins and Current Losses columns based on the last 10 results.

You don't say how many data columns there may be, just it could be 10 years of results, so I've taken it up to column XAA.

The AGGREGATE looks for the last 10 columns with results and returns that to the OFFSET which sets the range of the COUNTIF.

Daviboy30.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1
2
3PlayerCurrent RankCurrent WinsCurrent LossesNew Rank01-Jan-2108-Jan-2115-Jan-2122-Jan-2129-Jan-2105-Feb-2112-Feb-2119-Feb-2126-Feb-2105-Mar-2112-Mar-2119-Mar-2126-Mar-2102-Apr-2109-Apr-2116-Apr-2123-Apr-2130-Apr-21
4Joe4644WWWLLWWLWWWLWL
5Jack6737WWLWWLWWLWW
6Mary3372LWLWLLLWWLLL
Sheet1
Cell Formulas
RangeFormula
C4:C6C4=COUNTIF(OFFSET($E4,,AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10),,COLUMN($XAA$1)-AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10)),"W")
D4:D6D4=COUNTIF(OFFSET($E4,,AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10),,COLUMN($XAA$1)-AGGREGATE(14,6,COLUMN($F$4:$XFD$4)-COLUMN($E$4)/($F4:$XFD4<>""),10)),"L")
E4:E6E4=IF(C4>6, B4+1, IF(D4>6, B4-1, IF(B4=2, 2, IF(B4=3, 3, IF(B4=4, 4, IF(B4=5, 5, IF(B4=6, 6, IF(B4=7, 7))))))))
Hi Toadstool,
Thank you for the formula. I works great! Except for one thing: If a players rank moves up or down, then the Current Wins and Current Losses need to be reset to zero. Again, thank you!
 
Upvote 0
Here is another option for looking at counts for the last 10 results. These also work if less than 10 results exist.

21 11 08.xlsm
ACDFGHIJKLMNOPQRSTUVWX
3PlayerCurrent WinsCurrent Losses1/11/81/151/221/292/52/122/192/263/53/123/193/264/24/94/164/234/30
4Joe64WWWLLWWLWWWLWL
5Jack73WWLWWLWWLWW
6Mary37LWLWLLLWWLLL
7Ann12LWL
WL
Cell Formulas
RangeFormula
C4:C7C4=LEN(RIGHT(CONCAT(F4:ZZ4),10))-LEN(SUBSTITUTE(RIGHT(CONCAT(F4:ZZ4),10),"W",""))
D4:D7D4=LEN(RIGHT(CONCAT(F4:ZZ4),10))-C4
Peter_SSs,
Thank you for the reply. One thing I didn't make clear in my problem description was that if a player's rank moves up or down any particular week, then the Current Wins and Current Losses need to be reset back to zero.
 
Upvote 0
The New Rank uses Current Wins and Current Losses for its calculation so it will result in a circular reference error.
 
Upvote 0
One thing I didn't make clear in my problem description was that if a player's rank moves up or down any particular week, then the Current Wins and Current Losses need to be reset back to zero.
Yes, I understood that to be the case, I just don't know just how you would do that.
For example, what values would go in C4:E5 for the sample data shown, and how do you get those values if doing it manually (no formulas)?
Can you talk us through that process?
For simplicity I have just numbered the weeks 1 to 34.

Daviboy30.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAM
3PlayerCurrent RankCurrent WinsCurrent LossesNew Rank12345678910111213141516171819202122232425262728293031323334
4Joe4WLWWWLWWWWWWLWLWLLLWWWWWLWWLWLLW
5Jon5WWWWWWWLLLLLLLWWWWWWWLLLLLLLWWWLWW
WL
 
Upvote 0
"If a players rank moves up or down, then the Current Wins and Current Losses need to be reset to zero."
So if a player rank changes, up or down, then they must play at least another 10 matches before another rank change would be considered?

If that's the case, and I note Current Rank is a manual entry, then when you update the Current Rank you could use a new column "Date of Last Rank Change" and enter the date that occurred. Then our formulae could ignore any dates before then in the calculations.

Would that work for you?
 
Upvote 0
"If a players rank moves up or down, then the Current Wins and Current Losses need to be reset to zero."
So if a player rank changes, up or down, then they must play at least another 10 matches before another rank change would be considered?

If that's the case, and I note Current Rank is a manual entry, then when you update the Current Rank you could use a new column "Date of Last Rank Change" and enter the date that occurred. Then our formulae could ignore any dates before then in the calculations.

Would that work for you?
Yes, I think that would work.
 
Upvote 0
Yes, I understood that to be the case, I just don't know just how you would do that.
For example, what values would go in C4:E5 for the sample data shown, and how do you get those values if doing it manually (no formulas)?
Can you talk us through that process?
For simplicity I have just numbered the weeks 1 to 34.

Daviboy30.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAM
3PlayerCurrent RankCurrent WinsCurrent LossesNew Rank12345678910111213141516171819202122232425262728293031323334
4Joe4WLWWWLWWWWWWLWLWLLLWWWWWLWWLWLLW
5Jon5WWWWWWWLLLLLLLWWWWWWWLLLLLLLWWWLWW
WL
According to our league rules a player rank goes up or down if he wins or loses 7 out of 10 matches. If he wins 7 matches before playing all 10 matches, he does not move up or down until all 10 matches are played. In other words, a new player could win 7 matches in a row, but still has to play three more matches before he officially moves up. Also, a player could play 20 matches and never move up or down because in a ten match span he may not reach the 7-out-of-10 threshold.

According to your scenario, Joe would have moved up twice: once after 10 weeks and again after the 29th week. Because after each rank move up or down "resets the clock", by the 34th week Joe will have 2 wins in the Current Wins column and 3 losses in the Current Losses column.

According to your scenerio Jon would have moved up twice, then moved back down once: moved up to a 6 after 10 weeks, again moved up to a 7 after the 21st week, then moved back down to a 6 after the 31st week. After the 34th week Jon will have 2 wins in the Current Wins column and 1 Loss in the Current Losses column.

One thing I didn't mention because I want to keep it simple is that the lowest rank a player can have is a 2 and the highest rank you can have is 7. You can never go higher than a 7 and lower than a 2.

By the way, I've ordered a book on Excel formulas. Maybe I'll learn something. Thanks for your help.
 

Attachments

  • Screen Shot 2021-11-08 at 9.39.40 PM.png
    Screen Shot 2021-11-08 at 9.39.40 PM.png
    130.6 KB · Views: 24
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top