# How to Use AVERAGEIFS Function Between Two Times in Google Sheets

In Google Sheets, the AVERAGEIFS function considers just those cells that meet specified criteria and then computes their average. When you want to filter a range based on a condition and then compute the average based on the filter, the AVERAGEIFS function comes in handy. In this article, I will demonstrate how to use the AVERAGEIFS function  to calculate the average between two times in Google Sheets.

## 2 Simple Examples of Using AVERAGEIFS Function Between Two Times in Google Sheets

We will use the dataset below to demonstrate the example of calculating the average between two times using the AVERAGEIFS function in Google Sheets . The dataset contains the Employee Name, their Entry Time, and Working Hours of a particular day in an office.

### 1. Using AVERAGEIFS Function for AND Condition

We should use this example when we want to calculate the average for multiple conditions. Like we may wish to calculate the average between two times. We’ll find the average for those employees who has an entry time of more than 9:30 AM and less than 10:00 AM, which means the AND condition. We can do this by following the below steps.

Steps:

• First, select a cell where you want to display the average between two times. In our case, we selected Cell D15, and we want to calculate the average working hours of employees who entered the office between 9:30 AM to 10:00 AM.

• Now, type the formula below and press the Enter button-
`=AVERAGEIFS(D5:D13,C5:C13,">=9:30 AM",C5:C13,"<=10:00 AM")`

• Thus, it will show you the average working hour of employees that entered the office between 9:30 AM to 10:00 AM.

### 2. Applying AVERAGEIFS Function for OR Condition

Sometimes, we may wish to calculate the average for the OR condition. Like we may want to calculate the average for multiple conditions and then we may want to sum those conditions. We can accomplish this by following the steps described below.

Steps:

• First, choose a cell to display the average of two times. In our situation, we choose Cell D15 and want to compute the average working hour of employees who arrived at the workplace between 9:30 AM to 9:45 AM and 9:45 AM to 10:00 AM, and we want to sum two conditions.

• Now, enter the following formula and press the Enter key-
`=AVERAGEIFS(D5:D13,C5:C13,">=9:30 AM",C5:C13,"<=9:45 AM")+AVERAGEIFS(D5:D13,C5:C13,">=9:45 AM",C5:C13,"<=10:00 AM")`

It will first compute the average working hour of workers who arrived at the workplace between 9:30 AM and 9:45 AM and then compute the average working hour of employees who arrived between 9:45 AM and 10:00 AM. Finally, it will add the two averages together.

• Thus, it will display the total of the average working hours of employees who entered between 9:30 AM and 9:45 AM and 9:45 AM to 10:00 AM.

## How to Use AVERAGEIFS Function to Calculate Average Between Two Dates in Google Sheets

In Google Sheets, we may wish to calculate the average between two dates. We can also accomplish this by using the AVERAGEIFS function.

Steps:

• First, choose a cell in which you wish to display the average of two dates. In our scenario, we choose Cell D15 and wish to determine the average working hour of employee Jack from December 1 to December 7.

• Now, type the formula below and press the Enter key-
`=AVERAGEIFS(D5:D12,C5:C12,">=Dec-1",C5:C12,"<=Dec7")`

• As a result, it will show the average working hours of employee Jack during the first week of December.

## Conclusion

In this article, we have shown how to average data between two times using the AVERAGEIFS function in Google Sheets. We have shown 2 examples of doing such a thing. We have also shown how to average data between two dates in Google Sheets. Please feel free to leave any suggestions or ask any questions in the comment section below. To explore more, visit officewheel.com.

## Related Article

#### Sishir Roy

Hello, I'm Sishir Roy. I currently work for the SOFTEKO company at officewheel.com as a technical writer and content developer. I completed my BSc degree in civil engineering from BUET. I like using my talents as a creative problem-solver and thinker to come up with innovative solutions to problems. I have a great interest in the research and development of data science. Please follow my blog at Officewheel.com for more Google Sheets solutions.

We will be happy to hear your thoughts