Skip to main content

Excel AVERAGEIF Function

The AVERAGEIF function calculates the average (arithmetic mean) of the numbers in a range that meet the given criteria.

averageif function 1


Syntax

=AVERAGEIF (range, criteria, [average_range])


Arguments

  • Range (required): The range of one or more cells, including numbers or names, arrays, or references that contain numbers.
  • Criteria (required): The criteria that defines which cells to average. It could be a number, expression, cell reference, or text.
  • Average_range (optional): Optional. The actual range of cells to average. If omitted, range is used.

Return value

The AVERAGEIF function returns a numeric value.


Function notes

  1. Cells in range that contain TRUE or FALSE are ignored.
  2. Empty cells in range and average_range are ignored.
  3. When criteria is an empty cell, it will be treated as zero (0) value.
  4. Logical operators (>,<,<>,=) and wildcards (*,?) for partial matching can be included in the criteria argument.
  5. The #DIV/0! error will occur if:
    • no cells in range meet the criteria
    • the values to be averaged are all non-numeric
  6. Average_range does not have to be the same size as range. The actual cells to average start from the top left cell in Average_range and are the cells that correspond to cells in range.
  7. Only one condition can be applied for in the AVERAGEIF function. If multiple criteria are needed, use the AVERAGEIFS function.

Examples

In this case, we need to calculate the averages of numbers which meet the different criteria in the table below. To achieve this goal, please do as follows:

1. Copy the formula below into cell F5.

=AVERAGEIF (B5:B14, E5, C5:C14)

2. Convert range and average_range in the above formula to absolute.

  • Select range B5:B14, press the F4 key to get $B$5:$B$14
  • Select range C5:C14, press the F4 key to get $C$5:$C$14.

3. Press the Enter button to get the result in F5.

4. Then drag the fill handle down to the cells you want to apply this formula too. The results are as the following screenshot shows.

averageif function 2

Notes:

  1. The criteria argument of the above formula is supplied as a cell reference.
  2. We can directly input value in criteria. The three formulas in the cell F5, F6, and F7 are respectively changed to:

    =AVERAGEIF (B5:B14, "Mango", C5:C14)

    =AVERAGEIF (B5:B14, "A*", C5:C14)

    =AVERAGEIF (B5:B14, "<>Lemon", C5:C14)

  3. Criteria "Mango" means to average the sales of Mango.
    Criteria "A*" means to average the sales of items which start with “A”.
    Criteria "<>Lemon" means to average the sales of items which are not Lemon.

Relative Functions:

  • Excel DEVSQ Function
    The DEVSQ function calculates the sum of squares of the deviations from the sample mean.

  • Excel DSTDEV Function
    The DSTDEV function returns the estimated value of the standard deviation of a population based on a sample.

  • Excel DSTDEVP Function
    The Excel DSTDEVP function returns the standard deviation of a population by using the numbers from the entire database that match the given criteria you specify.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations