Results 1 to 8 of 8

Calculating value for maximum consecutive value

Threaded View

than_k22 Calculating value for maximum... 07-25-2010, 06:54 PM
rethguals Re: Calculating value for... 07-25-2010, 10:36 PM
than_k22 Re: Calculating value for... 07-26-2010, 01:07 AM
rethguals Re: Calculating value for... 07-26-2010, 03:25 AM
DonkeyOte Re: Calculating value for... 07-26-2010, 04:30 AM
DonkeyOte Re: Calculating value for... 07-26-2010, 04:40 AM
than_k22 Re: Calculating value for... 07-26-2010, 08:00 AM
than_k22 Re: Calculating value for... 10-15-2010, 01:08 PM
  1. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating value for maximum consecutive value

    than_k22

    Using your original sample file (you don't really need S:AH) but leaving them in for the time being for sake of continuity the following single cell calcs should do what you want:

    AL2:
    =MAX(FREQUENCY(IF(B2:Q2<>0,COLUMN(B2:Q2)),IF(B2:Q2=0,COLUMN(B2:Q2))))
    confirmed with CTRL + SHIFT + ENTER
    copied down
    For the average of the Max run(s)

    AM2:
    =IF($AL2=0,"",MAX(SUBTOTAL(9,OFFSET($A2,0,$AL2-1+(ROW(A$1:INDEX(A:A,COLUMN($Q2)-$AL2))),1,-$AL2))*(SUBTOTAL(5,OFFSET($A2,0,$AL2-1+(ROW(A$1:INDEX(A:A,COLUMN($Q2)-$AL2))),1,-$AL2))>0))/$AL2)
    confirmed with CTRL + SHIFT + ENTER
    copied down
    I have little doubt there is a more efficient method for the Average however.

    edit: in retrospect I'm not sure the Average calc does exactly what you want re: multiple "maximum" runs ... ie 2 runs of 2
    the array above will average the values of the run that has the highest aggregate value as opposed to the average of all of the averages...
    let us know.
    Last edited by DonkeyOte; 07-26-2010 at 04:33 AM.

Thread Information

Users Browsing this Thread

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

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