average of certain data between two dates and times in Excel

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
Who is Participating?
barry houdiniConnect With a Mentor Commented:
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


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

see attached

regards, barry
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.