+ Reply to Thread
Results 1 to 3 of 3

Calculating the maximum run of the same digit

  1. #1
    Registered User
    Join Date
    06-28-2005
    Posts
    48

    Calculating the maximum run of the same digit

    Hi,

    I am trying to find an equation that would count the maximum run of zero's in a row of data

    eg)

    a b c d e f g
    1 1 0 1 0 0 1 = 2
    0 0 0 1 0 1 1 = 3
    0 1 1 1 0 1 1 = 1

    each digit (1/0) is in a separate column but on the same row and whilst I can count the number of 0's in the row, I am having trouble finding counting the maximum run of zero's in each row.

    Any help would be greatly appreciated.

    Richard.

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

    Re: Calculating the maximum run of the same digit

    You can use a Frequency Array

    Please Login or Register  to view this content.
    (you might choose to add a pre-emptive COUNTIF test on 0 to ensure there is a streak to find in the first instance)

  3. #3
    Registered User
    Join Date
    06-28-2005
    Posts
    48

    Re: Calculating the maximum run of the same digit

    perfect, thank you very much for your help

+ Reply to Thread

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