Average Return Values Based on Two Conditions (Times)

loveland517

New Member
Joined
Jan 17, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
PLEASE HELP! Small business owner trying to understand where I can improve my response times!

In the table below, I am attempting to find the average of the hours based on time frames.
In another cell I would like to calculate the average hours these tickets have been unfulfilled if the time open (lets say from 7am till 3pm, then 3pm to 11pm).
So I understand I need a formula to return values based on the time range (which is two conditions *a start and end time*) that I am am searching for and then to average them - I attempted to use IF nested within AVERAGE but got really confused. Any chance I could get some guidance?

*if formula was applied to below: the 7am-3pm cell would only average "4" and the 3pm-11pm cell the formula should average "21+20+20+1+231+232+156 / 7"

HoursDateTimeType
21​
10/4/2021
3:08:56 PM​
A
20​
10/4/2021
4:06:34 PM​
A
20​
10/9/2021
6:06:55 PM​
A
1​
10/10/2021
4:14:20 PM​
B
4​
10/13/2021
11:39:26 AM​
B
231​
10/16/2021
3:44:05 PM​
B
232​
10/16/2021
3:10:25 PM​
C
156​
10/19/2021
7:16:09 PM​
C
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEF
1HoursDateTimeType
22104/10/20213:08:56 PMAEarly4
32004/10/20214:06:34 PMALate97.28571
42009/10/20216:06:55 PMA
5110/10/20214:14:20 PMB
6413/10/202111:39:26 AMB
723116/10/20213:44:05 PMB
823216/10/20213:10:25 PMC
915619/10/20217:16:09 PMC
Data
Cell Formulas
RangeFormula
F2F2=AVERAGEIFS(A:A,C:C,">="&TIME(7,0,0),C:C,"<"&TIME(15,0,0))
F3F3=AVERAGEIFS(A:A,C:C,">="&TIME(15,0,0),C:C,"<"&TIME(23,0,0))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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?

Disable AdBlock

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
Back
Top