+ Reply to Thread
Results 1 to 4 of 4

Formula for finding number of consecutive blank cells over a year - See info!

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2010
    Posts
    6

    Formula for finding number of consecutive blank cells over a year - See info!

    Have 8 years worth of a river catchment's precipitation data. There are readings taken on the hour every hour every day, laid out as below. I'm stuck on how to find a formula that could find the number of 'rain days' throughout the year i.e. the number of consecutive 24 hour periods between midnights with 0 precipitation. Any suggestions at all?

    31/12/1993 19:00 0
    31/12/1993 20:00 0
    31/12/1993 21:00 0.047
    31/12/1993 22:00 0.149
    31/12/1993 23:00 0.031
    01/01/1994 00:00 0.007

    Cheers in advance guys

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Formula for finding number of consecutive blank cells over a year - See info!

    Suggest the following (assuming data is in columns A to C and there is a header row)

    Copy column A to column E
    Deduplicate column E (data - remove duplicates)

    Enter =SUMIF(A:A,E2,C:C) into F2
    Copy F2 down rest of column F (double click on fill handle)
    Apply autofilters to columns E and F
    Filter for rows where column F = 0
    Martin

  3. #3
    Registered User
    Join Date
    03-14-2013
    Location
    Cardiff
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Formula for finding number of consecutive blank cells over a year - See info!

    Hi mrice,

    Only thing is it's two columns (i.e. the timestamp 01/01/1994 00:00 is in column A, and the precipitation data is in column B)..

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Formula for finding number of consecutive blank cells over a year - See info!

    OK try this

    In C2 type =INT(A2) and copy down

    Copy column C and paste special - values into column F

    Remove duplicates from column F

    in G2 type =SUMIF(C:C,F2,B:B) and copy down.

+ 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