AVERAGEIFS calculates the mean of values whose rows satisfy multiple conditions in Google Sheets. It lets you average one team’s email workload without mixing in that team’s chat records or another team’s email records.
We will use six fictional service records and keep a genuine zero in the calculation. The example distinguishes a conditional mean from an average of group averages, which can represent a different weighting rule.

Paste the service records
Copy this tab-separated block into A1 on a blank worksheet:
| Row | A | B | C |
|---|---|---|---|
| 1 | Team | Channel | Hours |
| 2 | Support | 6 | |
| 3 | Support | Chat | 4 |
| 4 | Support | 10 | |
| 5 | Sales | 8 | |
| 6 | Support | 0 | |
| 7 | Sales | Chat | 12 |
Copy only the tab-separated block below. Worksheet letters and row numbers in the preview are display labels, not part of the data.
Team Channel Hours
Support Email 6
Support Chat 4
Support Email 10
Sales Email 8
Support Email 0
Sales Chat 12
The team and channel labels are in A2:B7, and the observed hours are in C2:C7. Each row represents one record in the same reporting period. The zero-hour Support email record is present and measured; it is not an unknown duration.
Use ordinary numbers in column C. Formatting a text import to look numeric does not establish that it contains valid measured values. These formulas use English function names and commas.
Average the matching rows
In F2, enter:
=AVERAGEIFS(C2:C7,A2:A7,"Support",B2:B7,"Email")
The matching values are 6, 10, and 0. Their sum is 16 and their count is three, giving an exact mean of \(\frac{16}{3}\) hours, approximately 5.333333 hours.
The first range supplies the values to average. Each later range-and-criterion pair selects eligible rows. The criteria work together with AND, so a record must belong to Support and use Email to be included.
To inspect the denominator separately, enter this in F4:
=COUNTIFS(A2:A7,"Support",B2:B7,"Email")
The expected answer is 3. Counting the selected rows independently is a useful way to understand an average rather than accepting one unexplained number.
See what excluding zero changes
Enter the following in F3:
=AVERAGEIFS(C2:C7,A2:A7,"Support",B2:B7,"Email",C2:C7,">0")
The result is 8, because only 6 and 10 remain: \(\frac{6+10}{2}=8\). This is not a repair of the first average. It answers the narrower question of average positive hours among the qualifying records.
Excluding zero can be reasonable when that is the intended definition, but it should not be a silent cosmetic choice. A real zero conveys different information from a missing observation, and removing it changes both the included records and the denominator.
Handle a group with no matching records
Our data contain no Legal team. To show a readable label for that case, enter this in F5:
=IFERROR(AVERAGEIFS(C2:C7,A2:A7,"Legal"),"No matching records")
The expected label is No matching records, rather than a fabricated mean of zero. No qualifying observations do not establish that the average duration was zero.
IFERROR is broad: it can replace errors caused by bad references or invalid inputs as well. During troubleshooting, run the inner AVERAGEIFS alone, check the ranges, and confirm that the problem really is the absence of qualifying observations before hiding the error.
Keep measurement and grouping rules consistent
Every criteria range must describe the same source rows as C2:C7. A one-row shift can select one record’s team while averaging another record’s hours. Extra spaces in a label can also remove records you intended to include.
For a larger report, specify whether a row represents a ticket, a person, or a daily total. An average of daily averages does not generally equal the mean of every original ticket when daily counts differ. Start from the row-level observations when each record should have equal weight.
Display rounding without changing the definition
You may format F2 to display 5.33 hours for readability. Keep the distinction between that rounded display and the exact underlying ratio of \(\frac{16}{3}\). Do not repeatedly round intermediate group averages and then assume a later combined result is exact.
Before using the calculation in a report, check one included row, one row excluded by team, one excluded by channel, the genuine zero, and the no-match case. Those examples make the selection rule visible.
Further reading
- Google Docs Editors HelpAVERAGEIFSOfficial documentation for the function or spreadsheet setting used in this tutorial.
- Google Docs Editors HelpCOUNTIFSOfficial documentation for the function or spreadsheet setting used in this tutorial.
- Google Docs Editors HelpIF functionOfficial documentation for the function or spreadsheet setting used in this tutorial.
- MathBlogGoogle Sheets tutorialsMore practical guides to cleaning, combining, and understanding your data.