Conditional Average in Excel (Complete Guide)

Conditional averages involve calculating the average of a subset of data that meets specific criteria. In this Excel tutorial, we will demonstrate how to calculate a conditional average in Excel using the AVERAGEIF function and the AVERAGEIFS FUNCTION.

We will present three examples using these functions to calculate conditional averages using the following dataset containing the annual salaries of some employees in different departments.

Dataset Overview


Example 1 – Applying the AVERAGEIF Function for a Text Condition

Let’s calculate the average salary of the employees in the Sales department.

  • Apply the following formula in cell C19:
=AVERAGEIF(D6:D16,C18,E6:E16)

Using AVERAGEIF Function to Calculate Conditional Average in Excel


Example 2 – Using the AVERAGEIF Function with a Numerical Condition

Now let’s calculate the average salary of the employees with an annual salary of over $100000.

  • Apply the following formula in cell C19:
=AVERAGEIF(E6:E16,">"&C18)

Using AVERAGEIF Function to Calculate Average with Numerical Condition in Excel


Example 3 – Using the AVERAGEIFS Function to Calculate the Average with Multiple Conditions

Let’s calculate the average salary of the employees who are from the Sales department and have an annual salary over $100000. For conditional averages with multiple criteria, we use the AVERAGEIFS function.

  • Apply the following formula in cell C20:
=AVERAGEIFS(E6:E16,D6:D16,C18,E6:E16,">"&C19)

Using AVERAGEIFS Function to Calculate Average with Multiple Conditions in Excel

Read More: How to Exclude a Cell in Excel AVERAGE Formula


Conditional Average in Excel: Knowledge Hub


<< Go Back to Calculate Average in Excel | How to Calculate in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Seemanto Saha
Seemanto Saha

Seemanto Saha graduated in Industrial and Production Engineering from Bangladesh University of Engineering and Technology. He has been with ExcelDemy for a year, where he wrote 40+ articles and reviewed 50+ articles. He has also worked on the ExcelDemy Forum and solved 50+ user problems. Currently, he is working as a team leader for ExcelDemy. His role is to guide his team to write reader-friendly content. His interests are Advanced Excel, Data Analysis, Charts & Dashboards, Power Query,... Read Full Bio

4 Comments
  1. loved it.

    • Hello Samwel Gurt,

      Thank you so much. We are glad to hear that you loved our article. You can explore more article related to these topic. Keep learning Excel with ExcelDemy.

      Regards
      ExcelDemy

  2. Thanks! This is very helpful to me.
    One more question is, how can I get color from a specific cell in another sheet?

    • Hello Alex,

      You are most welcome. Thanks for your appreciation, it’s great to hear that you found the article helpful.
      To get cell color from a specific cell you can use the user defined function.
      Copy paste the VBA code:

      Function GetCellColor(rng As Range) As Long
          GetCellColor = rng.Interior.Color
      End Function
      

      Use this function in a cell to reference the specific cell from another sheet whose color you want to retrieve.

      You also can follow this article: How to Get Cell Color in Excel

      Regards
      ExcelDemy

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo