+ Reply to Thread
Results 1 to 9 of 9

MAX Consecutive across columns

Hybrid View

  1. #1
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: MAX Consecutive across columns

    Quote Originally Posted by williampdx
    Are there other options for coming up with the same information using an array?
    Realistically given your data you would need to create a contiguous listing and work from that.

    Using your sample file... insert a new sheet, name it "Data" and add following headers:

    A1: Date
    B1: +/-
    C1: Sign
    Then

    A2:
    =IF(MOD(ROWS(A$2:A2)-1,7),A1,INDEX('COR Table'!$B:$B,3+CEILING(ROWS(A$2:A2)/7,1)+CEILING(ROWS(A$2:A2)/35,1)-1))
    
    B2:
    =INDEX('COR Table'!$A:$BF,3+CEILING(ROWS(A$2:A2)/7,1)+CEILING(ROWS(A$2:A2)/35,1)-1,9+8*MOD(ROWS(A$2:A2)-1,7))
    
    C2:
    =IF(B2=0,N(C1),SIGN(B2))
    
    copy A2:C2 down to row 1191 (to cover your 1190 data points)
    With the above in place your "streak" calculations can be based off the above data set with relative ease:

    Wins:
    =MAX(FREQUENCY(IF(Data!$C$2:$C$1191=1,ROW(Data!$C$2:$C$1191)),IF(Data!$C$2:$C$1191<1,ROW(Data!$C$2:$C$1191))))
    confirmed with CTRL + SHIFT + ENTER
    
    Losses (as above but using -1 and > test):
    =MAX(FREQUENCY(IF(Data!$C$2:$C$1191=-1,ROW(Data!$C$2:$C$1191)),IF(Data!$C$2:$C$1191>-1,ROW(Data!$C$2:$C$1191))))
    confirmed with CTRL + SHIFT + ENTER
    Based on the sample data I believe the answer for both calculations is 24, correct ?

  2. #2
    Registered User
    Join Date
    03-31-2010
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: MAX Consecutive across columns

    Actually, the answer for consecutive losses is 12, and consecutive wins is 15. Your solution would work, but I need a solution that will not require the addition of another worksheet. It really is essential I keep the worksheets to a minimum and can have an ongoing total on the same COR TABLE sheet. Any other ways to do this??

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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