The AVERAGEIF function returns the average of the cells of an array that satisfy one or more given criteria, which can be from the same array or a different array. Let’s find out the average greater than 0 using this function.
We’ll use the sample dataset below, containing the Product in column B, the Quantity in column C, and the Average Greater Than 0 in column D.
Steps:
- Enter the following formula in cell D5:
=AVERAGE(IF(C5:C11<>0, C5:C11))
- Press Enter to return the result.
Read More: Excel AVERAGEIF with ‘Greater Than’ and ‘Less Than’ Criteria
How to Use AVERAGEIF Function Between Two Values
Let’s now use the AVERAGEIF function to find the average between two values in Excel.
Steps:
- Arrange a dataset like the following image.
- In cell E5 enter the following formula:
=AVERAGEIFS(D5:D11,C5:C11,">=75",C5:C11,"<=85")
- Press Enter to return the desired result.
Read More: How to Calculate Average If Number Matches Criteria in Excel
How to Use AVERAGEIF Function for Cells Containing Text
We can also use the AVERAGEIF function to find the average if cell contains the text.
Steps:
- Arrange a dataset like the following image.
- In cell D5 enter the following formula:
=AVERAGEIF(B5:B11,"*Desktop*",C5:C11)
- Press Enter to return the desired result.
How to Use AVERAGEIF Function Between Two Dates in Excel
Finally, let’s use the AVERAGEIF function to find the desired result between two dates.
Steps:
- Arrange a dataset like the following image.
- In cell E5 enter the following formula:
=AVERAGEIF(C5:C11,">1/10/2022",D5:D11)
- Press Enter to return the desired result.
Things to Remember
- When using formulas, take care to select the desired cells properly, or the results may be incorrect or confusing.
- When applying this function with text, take care to spell the text exactly like the dataset, or no result will be returned.
Download Practice Workbook
Related Articles
<< Go Back to Excel AVERAGEIF Function | Excel Functions | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!