+ Reply to Thread
Results 1 to 10 of 10

Average Data for 15 min Intervals with Different Number of Data For Some Intervals

  1. #1
    Registered User
    Join Date
    07-05-2017
    Location
    Arkansas, United States
    MS-Off Ver
    2016
    Posts
    23

    Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Hope someone can help me, I don't have much experience in coding.

    I want to average the given flows into 15 min intervals. I have data once every minute for most of the 15 min interval, but not all. I am sure there is some type of formula/coding to show this data, but I cannot figure it out. Here is an example:

    Date/Time[INDENT] GPM[INDENT] Date/Time 15min Intervals[INDENT] Average GPM
    4/12/2017 1:00[INDENT] 100[INDENT] 4/12/2017 1:00[INDENT] 102.67
    4/12/2017 1:04[INDENT] 102[INDENT] 4/12/2017 1:15[INDENT] 90
    4/12/2017 1:14[INDENT] 106[INDENT] 4/12/2017 1:30[INDENT] 125
    4/12/2017 1:15[INDENT] 95
    4/12/2017 1:17[INDENT] 105
    4/12/2017 1:23[INDENT] 75
    4/12/2017 1:28[INDENT] 85
    4/12/2017 1:33[INDENT] 120
    4/12/2017 1:36[INDENT] 130

    I need to know how to figure out the fourth column shown for a very large excel file.
    Last edited by kmartin13; 07-05-2017 at 04:02 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Try this:

    =AVERAGEIFS(C:C,B:B,">="&E2,B:B,"<"&(E2+0.25/24))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    07-05-2017
    Location
    Arkansas, United States
    MS-Off Ver
    2016
    Posts
    23

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    This works great, but only if I have time in the cell, it won't recognize it if it has the date and time combined in the same cell. Is there any way I can make it recognize this? Reason I'm asking is, this data goes on for approximately 4 months. Thanks very much for your time.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  5. #5
    Registered User
    Join Date
    07-05-2017
    Location
    Arkansas, United States
    MS-Off Ver
    2016
    Posts
    23

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    I have attached the scaled down excel file. Sorry it took me so long to reply, I have been on vacation.
    Attached Files Attached Files

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2507
    Posts
    13,809

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Try two helper columns for the lower and upper row interval boundaries.

    In column C
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In column D
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In column E the averages @ 15 min intervals or the last interval < 15 min.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  7. #7
    Registered User
    Join Date
    07-05-2017
    Location
    Arkansas, United States
    MS-Off Ver
    2016
    Posts
    23

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Thanks for the help, but I'm not sure what happened, after two averages it stops. The number also averaged at different time periods, they weren't on 15 min intervals.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Try this array formula:

    =IFERROR(AVERAGE(IF(MOD($A$2:$A$29,1)>=D2,IF(MOD($A$2:$A$29,1)<(D2+0.25/24),$B$2:$B$29))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-05-2017
    Location
    Arkansas, United States
    MS-Off Ver
    2016
    Posts
    23

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    Got it to work, thank you very much for the help!

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Data for 15 min Intervals with Different Number of Data For Some Intervals

    You're welcome and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 04-20-2019, 01:19 AM
  2. Replies: 1
    Last Post: 09-27-2016, 12:41 AM
  3. [SOLVED] Simplifying Thousands of Temperature data points to 10-15 "Average" Intervals
    By kpb61 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2016, 08:44 AM
  4. [SOLVED] Graphic using average at certain intervals in a data column
    By Frekazoid in forum Excel General
    Replies: 2
    Last Post: 03-31-2016, 05:09 AM
  5. Calculating quantiies from irregular intervals to regular intervals
    By abhi1421 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-15-2014, 06:34 AM
  6. [SOLVED] How to apply a 30 second moving average to data with inconsistent time intervals
    By WE5T in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2012, 05:58 AM
  7. Converting Data in Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 02:42 AM

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