AVERAGEIFS with time as criteria

DocCod

New Member
Joined
Dec 24, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
I’m trying to get an average of data in column C based on the corresponding time range in column A. The input in columm A is time. So for example, say I want the average between 09:00:00 and 09:30:01. In Column N2 and NO I put those 2 times respectively.



The formula I made was the following:



Excel Formula:
=AVERAGEIFS(C2:C17190;A2:A17190;A2:A17190>=N2;A2:A17190;A2:A17190<O2)



This however returns a DIV/0 error. I don’t know what I’m doing wrong. I’ve been working on this for days and I can’t seem to get it right. Help would be greatly appreciated.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try this:

VBA Code:
=AVERAGEIFS(C2:C17190;A2:A17190;">="&N2;A2:A17190;"<"&O2)
 
Upvote 0
Solution
Try this:

VBA Code:
=AVERAGEIFS(C2:C17190;A2:A17190;">="&N2;A2:A17190;"<"&O2)
Whoa it worked! Thank you so much! I'm fairly new to Excel, do you always need to add the:

Rich (BB code):
">="&

in order for it to work in a formula like that?
 
Upvote 0

Forum statistics

Threads
1,215,409
Messages
6,124,737
Members
449,185
Latest member
hopkinsr

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