Finance

Charts

Statistics

Macros

Search

How to use the AVERAGEIF function in Excel

The AVERAGEIF function calculates the average of cells that meet specified criteria. This function supports logical operators (<, >, <>, =) and wildcards (*, ?) in its criteria.

The AVERAGEIF function uses the following syntax:

=AVERAGEIF(range; criteria; [average_range]) 

Range (Required Argument): The set of cells to evaluate, which may contain numbers, names, arrays, or number-containing references.
Criteria (Required Argument): The condition determining which cells to average (can be a number, expression, cell reference, or text – e.g., 13, « <14 »).
Average_range (Optional Argument): The actual cells to average. If omitted, the function uses the range argument.

USING THE AVERAGEIF FUNCTION
Let’s calculate the average sales of cakes from the table below.

To find the average sales of chocolate cakes:

  1. Select an empty cell and enter:

=AVERAGEIF(A2:A6; « chocolate »; B2:B6)

  1. Press Enter to display the result: 266 (as shown below).

NOTE: Important AVERAGEIF considerations:

  • #DIV/0! error occurs when:
    • No cells meet the criteria
    • The range is empty or contains text
  • Criteria referencing empty cells are treated as zero
  • Cells with TRUE/FALSE values are ignored
  • Supports wildcards (*, ?) in criteria
0 0 votes
Évaluation de l'article
S’abonner
Notification pour
guest
0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
Online comments
Show all comments
Facebook
Twitter
LinkedIn
WhatsApp
Email
Print
0
We’d love to hear your thoughts — please leave a commentx