The traditional way to solve this problem is to use theAVERAGEIFS function.

However, you could also use theFILTER functionwith theAVERAGE function, as explained below.

Because FILTER can work with rangesandarrays, it is a more flexible solution.

Excel formula: Average numbers ignore zero

have group values).

The main challenge with AVERAGEIFS is thequirky syntax.

For criteria, we simply use the “not equal to” operator, “<>”.

Excel formula: Average top 3 scores

“not blank”.

To read more about how to use the AVERAGEIFS function with logical operators and wildcards,see this page.

Excluding formulas

The formula above will treat empty strings returned by formulas as not empty.

Excel formula: Average last n rows

FILTER is a more flexible function that can apply criteria in ways that AVERAGEIFS can’t.

For more on the FILTER function,see this page.

The output from FILTER is dynamic.

Excel AVERAGEIFS function

If source data or criteria change, FILTER will return a new set of results.

Excel FILTER function

Excel AVERAGE function