+ Reply to Thread
Results 1 to 4 of 4

SUM data in column based on Date/Time range

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    Bangor, Wales
    MS-Off Ver
    Excel 2003
    Posts
    17

    SUM data in column based on Date/Time range

    Hi all

    Tried some searches to solve this but couldn't find exactly how to do this.

    I have a long list of dates and times in column A, beginning 01/01/2013 00:00 and proceeding in 5 minute steps. In column B I have measured rainfall amounts for each 5 minute step.

    What I want to do is calculate the total amount of rain in intervals of 1,2,3....30 days prior to a specific date and time. So let's say that time is 30/01/2013 12:00, I therefore want to work out the total rain from 29/01/2013 12:05 to 30/01/2013 12:00 and then from 28/01/2013 12:05 to 30/01/2013 12:00, etc.

    Can anyone advise on this please?

    Thank you,
    Tim.
    Last edited by t.jones; 06-11-2013 at 06:37 PM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUM data in column based on Date/Time range

    Try this...

    Use cells to hold the date/time criteria:

    D2 = lower date/time boundary
    E2 = upper date/time boundary

    Then, for the total rainfall within that time period:

    =SUMPRODUCT(--(A2:A1000>=D2),--(A2:A1000<=E2),B2:B1000)

    Adjust the ranges to suit.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    10-26-2011
    Location
    Bangor, Wales
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: SUM data in column based on Date/Time range

    That's perfect, thanks so much!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUM data in column based on Date/Time range

    You're welcome. Thanks for the feedback!

+ 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