ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Functions > Excel AVERAGEIF Function

Excel AVERAGEIF Function

How to Use the Excel AVERAGEIF Function
Table of contents :
  • What is the Excel AVERAGEIF Function?
  • AVERAGEIF Syntax
  • How to Use AVERAGEIF Function in Excel
  • AVERAGEIF Limitations
  • AVERAGEIF Example

Excel AVERAGEIF Function

What is the Excel AVERAGEIF Function?

The Excel AVERAGEIF function returns the average (arithmetic mean) of values supplied that meet criteria.

AVERAGEIF Syntax

AVERAGEIF(range, criteria, [average_range])

range, required, cell, range or reference containing numbers to average

criteria, required, criteria in the form of text, cell reference, expression or a number.

average_range, optional, The actual range to average. When omitted, the range argument is used.

Usage Notes:

  • AVERAGEIF function ignores logical values (TRUE/FALSE).
  • AVERAGEIF function ignores empty cells in the average_range
  • AVERAGEIF function returns the #DIV0! error value if no cells in range meet criteria.
  • AVERAGEIF function treats an empty cell in criteria as 0 (zero) value.
  • AVERAGEIF function allows the wildcard characters asterisk (*) and question mark (?) in criteria. An asterisk wildcard for any character sequence, and a question mark wildcard for any single character; use a tilde (~) before character to find actual asterisk and question mark.
  • No need for average_range and range argument to have the same size. Excel uses the top left cell in average_range as the starting point, and the corresponding cells in the range are averaged.

How to Use AVERAGEIF Function in Excel

For example, there is data as shown below. How to create excel formulas for the following questions:

Excel AVERAGEIF Function

Question #1. What are the average sales for all iPhone variants in the Middle area?

The Formula

=AVERAGEIF(A2:A14,"MIDDLE",D2:D14)

Criteria argument is case insensitive; you can use uppercase or lowercase as you like. The result is 6,692.25.

Question #2. What are the average sales of iPhone 7 in all areas?

The Formula

=AVERAGEIF(B2:B14,"iphone 7",D2:D14)

If you are looking for a sales average for an iPhone variant point the range argument to column B. The result is 7,484.67.

Question #3. What are the average iPhone sales for the “plus” variant in all areas?

The Formula

=AVERAGEIF(B2:B14,"*plus",D2:D14)

The wildcard in the formula above will count all iPhone variants that have the “plus” word. The result is 7,736.67.

Question #4. What are the average iPhone sales for the “plus” variant in the “East” area?

Not applicable. Why? There are two criteria, criteria #1 have the “plus” word, criteria #2 East area. AVERAGEIF function is only able to handle one criteria. For more than one criteria, please use Excel AVERAGEIFS function.

There is a trick that can make you able to use the AVERAGEIF function even with more than one criteria. Read the AVERAGEIF limitation below.

Question #5. What are the average sales for an iPhone with 128GB of storage?

The Formula

=AVERAGEIF(C2:C14,128,D2:D14)

If the criteria is a number, there is no need to add an equal sign in front of the number. The result is  6,006.00.

Question #6. What is the average sales for iPhones with storage of less than 128GB?

The Formula

=AVERAGEIF(C2:C14,"<128",D2:D14)

If you use less-than or greater-than sign, the criteria must be enclosed with quotes even it’s a number. The result is 8,045.38

Question #7. What are the average sales for an iPhone with storage of less than 256GB and more than 32GB?

Not applicable. Just like question #4, there are two criteria use the Excel AVERAGEIFS function to solve this question. If you still want to use the AVERAGEIF function, read the solution in the “AVERAGEIF limitation” below.

**

Please see the image below for the complete results of the AVERAGEIF function in column G

Excel AVERAGEIF Function

AVERAGEIF Limitations

The AVERAGEIF function limitation is unable to handle more than one criteria. There are two solutions to solve it.

The first solution is to use the AVERAGEIFS function. The second solution is using a helper column that contains logical function AND/OR. Use the result in helper column as AVERAGEIF range argument and specify the criteria to be TRUE.

For more details, read the following article for a reference. It’s a different function, but you can use the same trick to solve the AVERAGEIF function limitations.

  • SUMIFS Limitation and Solutions

AVERAGEIF Example

Another article using or explain about AVERAGEIF Function

Another Statistical Function

Another article about Statistical Function
  • Excel AVERAGEIFS Function
  • Excel AVERAGEIF Function
  • Excel AVERAGEA Function
  • Excel AVERAGE Function

Another Logical Function

Another article about Logical Function
  • Excel IFNA Function
  • Excel AVERAGEIFS Function
  • Excel AVERAGEIF Function
  • Excel IFERROR Function
  • Excel SUMIFS Function
  • Excel SUMIF Function
  • Excel IFS Function
  • Excel IF Statement
  • Excel AND Function
  • Excel OR Function
Usefull links
  • Microsoft AVERAGEIF function documentation
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

How to Use SUM Function in Excel
What is the Excel SUM Function? Excel SUM function is …

Excel SUM Function

Excel Concatenate Function
What is the Excel CONCATENATE Function? The excel CONCATENATE function …

Excel CONCATENATE Function

Excel TRIM Function
What is the Excel TRIM Function? The excel TRIM function …

Excel TRIM Function

Excel AVERAGEA Function
What is the Excel AVERAGEA Function? The excel AVERAGEA function …

Excel AVERAGEA Function

Excel TEXTJOIN Function
What is the Excel TEXTJOIN Function? The excel TEXTJOIN function …

Excel TEXTJOIN Function

Tags:AVERAGEIF Example AVERAGEIF Excel Example AVERAGEIF Formula AVERAGEIF Formula Excel AVERAGEIF Formula in Excel AVERAGEIF Function in Excel AVERAGEIF Not Zero AVERAGEIF OR How to Do AVERAGEIF in Excel How to Use AVERAGEIF How to Use AVERAGEIF Formula in Excel How to Use AVERAGEIF Function How to Use AVERAGEIF Function in Excel How to Use AVERAGEIF in Excel How to Use The AVERAGEIF Function in Excel Logical Function Statistical Function Using AVERAGEIF in Excel

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh