Syntax AVERAGEIF(range,criteria,average_range)


The AVERAGEIF() function was new in Excel 2007.

Definition. This function calculates the average of all cells in a range that meet a specified criterion.


  • range (required). One or more cells to average, including numbers, names, arrays, or references that contain numbers.

  • criteria (required). The criteria—in the form of a number, an expression, a cell reference, or text—that define which cells are averaged.

  • average_range (optional). The actual set of cells to average. If average_range is not specified, range is used.


Cells in range that contain TRUE or FALSE are ignored.

If a cell in average_range is an empty cell, AVERAGEIF() ignores it. If range is empty or is a text value, ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.