# Excel formula that gives the Average amount of time if a corresponding cell falls between 2 times.

#### CAM76

##### New Member
Hi All,

New poster looking for any help would be greatly appreciated. What I'm lookingfor is a formula that will give me the average time it took to perform a taskbroken down by hour. Below is a look at the data I'm using.

Column A contains the time the task was started and B was the time it took tocomplete the task. I'd like to know the average amount of time it took tocomplete all tasks between the hours of 20:00-20:59:59. I've read a lot ofarticles trying to figure it out on my own and lots of trial and error, so anyhelp is appreciated.
<o></o>

A B
 15:40:22 0:08:01 20:34:52 0:08:09 17:22:20 0:08:16 10:21:56 0:11:49 11:10:41 0:07:38 18:21:52 0:14:17 15:02:56 0:13:10 20:08:38 0:11:56

<tbody>
</tbody>

### Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

#### Robert Mika

##### MrExcel MVP
Hello and welcome:
D2: 20:00:00
E2:20:59:59
F2 confirm Control+Shift+Snter:
=AVERAGE(IF(A2:A9>=D2,IF((A2:A9+B2:B9)<=E2,B2:B9)))
Result: 10.02 minutes

Replies
5
Views
73
Replies
7
Views
364
Replies
2
Views
228
Replies
1
Views
137
Replies
5
Views
104

1,126,986
Messages
5,621,992
Members
415,873
Latest member
fuulhouse

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back