+ Reply to Thread
Results 1 to 21 of 21

How do I get the current number of consecutive wins

  1. #1
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    How do I get the current number of consecutive wins

    Hi,

    See sheet attached.

    I'm looking for a formula for B3 so I can get the current win streak. I want this to update when I add data to week 10 onwards without me having to change the formula. I only want the current win streak and not previous ones.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,349

    Re: How do I get the current number of consecutive wins

    Welcome to the forum.

    An oft posed question! Have a look here: https://www.excelforum.com/excel-for...in-streak.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: How do I get the current number of consecutive wins

    ...when I add data to week 10 onwards without me having to change the formula. I only want the current win streak and not previous ones.
    one option

    B3: =MAX(0,MATCH(2,INDEX(1/(C3:R3="Win"),0))-MATCH(2,INDEX(1/(C3:R3="Lose"),0)))
    copied down
    Last edited by XLent; 05-15-2020 at 11:16 AM. Reason: removed note as link in AliGW post was changed.

  4. #4
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    So I understand what they've done on that thread but I don't want to use numbers to represent wins and losses if possible. Is there a formula that can count the number of times "win" appears consecutively and when "lose" comes up, the count resets to zero again.

  5. #5
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Quote Originally Posted by XLent View Post
    one option

    B3: =MAX(0,MATCH(2,INDEX(1/(C3:R3="Win"),0))-MATCH(2,INDEX(1/(C3:R3="Lose"),0)))
    copied down
    That works great. How do I change the formula if I want incorporate draw and forfeit?

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: How do I get the current number of consecutive wins

    if they break the sequence then

    B3: =MAX(0,MATCH(2,INDEX(1/(C3:R3="Win"),0))-MATCH(2,INDEX(1/(C3:R3<>"Win")/(C3:R3<>""),0)))

    if they persist the sequence

    B3: =MAX(0,MATCH(2,INDEX(1/(C3:R3<>"Lose")/(C3:R3<>""),0))-MATCH(2,INDEX(1/(C3:R3="Lose"),0)))

  7. #7
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Thanks.

    If I want to also add "win by forfeit" and I want this to add to the consecutive wins then how would I do that?

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: How do I get the current number of consecutive wins

    assuming Forfeit and Draw break the winning sequence, i.e. option 1 in prior post, then:

    B3: =MAX(0,MATCH(2,INDEX(1/(LEFT(C3:R3,3)="Win"),0))-MATCH(2,INDEX(1/(LEFT(C3:R3,3)<>"Win")/(C3:R3<>""),0)))

  9. #9
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    I mean if someone now can "win by forfeit" or "win", I want their number of consecutive wins to increase and the sequence to break when anything else happens. What is the formula please??
    Last edited by AliGW; 05-15-2020 at 11:47 AM. Reason: Please don't quote unnecessarily!

  10. #10
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: How do I get the current number of consecutive wins

    that provided (post#8); please test.

  11. #11
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Thats brilliant. Thanks for your help

  12. #12
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    When someone has lost all their games, the winning streaks shows N/A. How can this be fixed?

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: How do I get the current number of consecutive wins

    Please try at B3

    =COUNTA(C3:R3)-IFERROR(MATCH(2,INDEX(1/(LEFT(C3:R3,3)<>"win")/(C3:R3>""),)),0)

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,349

    Re: How do I get the current number of consecutive wins

    Try this:

    =IFERROR(your_chosen_formula,"Lost All Games")

  15. #15
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Quote Originally Posted by Bo_Ry View Post
    Please try at B3

    =COUNTA(C3:R3)-IFERROR(MATCH(2,INDEX(1/(LEFT(C3:R3,3)<>"win")/(C3:R3>""),)),0)
    This formula works but seems to return a value of 2 more than it should every time

  16. #16
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Quote Originally Posted by AliGW View Post
    Try this:

    =IFERROR(your_chosen_formula,"Lost All Games")
    This works but when someone starts playing in week 4 and there isn't any data in weeks 1 to 3, it still counts weeks 1 to 3 as a win.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,349

    Re: How do I get the current number of consecutive wins

    This works perfectly on the sample data you provided:

    =IFERROR(MAX(0,MATCH(2,INDEX(1/(LEFT(C3:R3,3)="Win"),0))-MATCH(2,INDEX(1/(LEFT(C3:R3,3)<>"Win")/(C3:R3<>""),0))),"All Losses")

    Perhaps you need to provide a more realistic dataset instead of constantly adding criteria and therefore shifting the goalposts - don't expect your helpers to be able to anticipate all these twists and turns!

  18. #18
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Sorry about that, could you please incorporate the point I previously mentioned and then that should be it
    Last edited by AliGW; 05-16-2020 at 03:40 AM. Reason: Please don't quote unnecessarily!

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,349

    Re: How do I get the current number of consecutive wins

    No. I won't help any further until you provide a more realistic set of sample data - sorry.

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  20. #20
    Registered User
    Join Date
    05-15-2020
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    17

    Re: How do I get the current number of consecutive wins

    Quote Originally Posted by Bo_Ry View Post
    Please try at B3

    =COUNTA(C3:R3)-IFERROR(MATCH(2,INDEX(1/(LEFT(C3:R3,3)<>"win")/(C3:R3>""),)),0)
    Actually that works perfectly, Thank you very much for your help!

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,349

    Re: How do I get the current number of consecutive wins

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Next time, think through all possible outcomes before providing sample data. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Consecutive Wins based off date
    By bobbief123 in forum Excel General
    Replies: 3
    Last Post: 05-07-2020, 01:10 AM
  2. [SOLVED] Calculating Max Consecutive Wins
    By ChaosTrader63 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-29-2020, 12:40 PM
  3. Formula to count consecutive wins/draws or max no loss streak
    By rooksboy1979 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2019, 01:03 PM
  4. [SOLVED] Wins and placing ratio number
    By I need excel help in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 11-27-2018, 03:00 PM
  5. Total the number of wins .
    By I need excel help in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2018, 10:53 PM
  6. Consecutive Wins vs team
    By hockeyguy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2014, 11:19 AM
  7. [SOLVED] IF statement for current wins/losses streak
    By damianberry in forum Excel General
    Replies: 1
    Last Post: 11-15-2012, 05:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1