?
Solved

average of certain data between two dates and times in Excel

Posted on 2011-04-27
1
Medium Priority
?
595 Views
Last Modified: 2012-05-11
I need to be able to average data between two dates and times.  In the example file, I need to (for example) average the Data in column D for the time period 10/13/10 7:36 - 10/13/10 7:40.

Id like code that I can use so that this can be accomplished in one cell - because I have to average many various dates and times this way.

Thanks in advance Book1.xlsx
0
Comment
Question by:SullivanEnvironmental
1 Comment
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 35475575
If you put the start time/date in I4 and the end time/date in J4 you can use this formula in K4 for the average between those two times inclusive

=AVERAGEIFS(D:D,A:A,">="&I4,A:A,"<="&J4)

You can list more time ranges below then just copy the formula down

see attached

regards, barry
26980380.xlsx
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question