+ Reply to Thread
Results 1 to 2 of 2

maximum length of dry spell, data in a single column

Hybrid View

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    maximum length of dry spell, data in a single column

    Hi all,

    here is a formula to calculate maximum consecutive wet days;

    =MAX(FREQUENCY(IF(B2:K2>0,COLUMN(B2:K2)),IF(B2:K2<=0,COLUMN(B2:K2))))

    this formula works fine when my data is in a row like (B2:k2) data is 1 0 0 0 1 1 0 1 0 0 answer is 2.
    (0 is for dry days, 1 is for wet days)

    now my data is in a column (B2:B11)

    1
    0
    0
    0
    1
    1
    0
    1
    0
    0

    I have changed formula like;


    =MAX(FREQUENCY(IF(B2:B11>0,COLUMN(B2:B11)),IF(B2:B11<=0,COLUMN(B2:B11))))


    but this is not giving the right answer, pls. help what is wrong?

    thank you
    sania

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: maximum length of dry spell, data in a single column

    Hi

    Try
    =MAX(FREQUENCY(IF(B2:B11>0,ROW(B2:B11)),IF(B2:B11<=0,ROW(B2:B11))))

    rylo

+ 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