How to Calculate the Average Excluding the Smallest & Highest Numbers in Excel

Calculating the average for a batch of data is frequently used in our daily life. But for some cases like statistic the average score in a competition, or price analysis, we often calculate the average excluding the smallest and highest numbers in the range of data. As we know we can use some formula like MAX or MIN to get the maximum value or minimum value in a range, so we can use formula combination to calculate the average excluding the MAX and MIN values. In this article, we will provide you some useful formulas to solve our problem.

Calculate the Average Excluding the Smallest and Highest Numbers by Formula 1


For example, we have a list of scores:

Calculate the Average Excluding the Smallest & Highest 1

As we all know, we can use the total amount minus the smallest value and the highest value, then divide the total number-2, so for this case we can use the similar formula combination to calculate the average. Details see steps below.

Step 1: In any blank cell, enter the formula =(SUM(A2:A9)-MIN(A2:A9)-MAX(A2:A9))/(COUNT(A2:A9)-2).

Calculate the Average Excluding the Smallest & Highest 2

Step 2: Click Enter to get the result. Verify that average is calculated properly.

Calculate the Average Excluding the Smallest & Highest 3

Calculate the Average Excluding the Smallest and Highest Numbers by Formula 2


Above formula combination is a little complex, we can use a special function TRIMMEAN to calculate the average for some conditions.

Step 1: In any blank cell, enter the formula =TRIMMEAN(A2:A9,2/COUNT(A2:A9)).

Calculate the Average Excluding the Smallest & Highest 4

Step 2: Click Enter to get the result. Verify that average is calculated properly. It is the same with the value calculated by the formula combination.

Calculate the Average Excluding the Smallest & Highest 5

Calculate the Average Excluding the Smallest and Highest Numbers by User Defined Formula in VBA


x
How to Show All Named Ranges in Excel

If we frequently use the function to calculate the average in daily work, we can create a user defined function by VBA, then we can use the function directly.

Step 1: Click Developer tab->Visual Basic or Alt+F11 to load Microsoft Visual Basic for Applications window.

Step 2: Click Insert->Module to insert a module. Then Module1 is created.

Calculate the Average Excluding the Smallest & Highest 6

Step 3: Enter below code in Module window.

Function AveExcludeSmallestHighest(myrange) As Variant
      With Application
        AveExcludeSmallestHighest = (.Sum(myrange) - .Max(myrange) - .Min(myrange)) / _
            (.Count(myrange) - 2)
      End With
End Function

See screenshot below:

Calculate the Average Excluding the Smallest & Highest 7

In above code, we create the function as AveExcludeSmallestHighest. You can shorten the function name per your requirement.

Step 4: In any blank cell, enter =ave, verify that user defined function AveExcludeSmallestHighest is loaded.

Calculate the Average Excluding the Smallest & Highest 8

Step 5: In any blank cell, enter the formula =AveExcludeSmallestHighest(A2:A9).

Calculate the Average Excluding the Smallest & Highest 9

Step 6: Click Enter to get the result.

Calculate the Average Excluding the Smallest & Highest 10

So after above steps, we can directly use this function to calculate the average in following work directly.

Related Functions


  • Excel SUM function
    The Excel SUM function will adds all numbers in a range of cells and returns the sum of these values. You can add individual values, cell references or ranges in excel.The syntax of the SUM function is as below:= SUM(number1,[number2],…)…
  • Excel MIN function
    The Excel MIN function returns the smallest numeric value from the numbers that you provided. Or returns the smallest value in the array.The MIN function is a build-in function in Microsoft Excel and it is categorized as a Statistical Function.The syntax of the MIN function is as below:= MIN(num1,[num2,…numn])….
  • Excel MAX function
    The Excel MAX function returns the largest numeric value from the numbers that you provided. Or returns the largest value in the array.= MAX(num1,[num2,…numn])…
  • Excel COUNT function
    The Excel COUNT function counts the number of cells that contain numbers, and counts numbers within the list of arguments. It returns a numeric value that indicate the number of cells that contain numbers in a range…

 

Related Posts

How to Extract First Letter from Each Word in a Cell in Excel
extract first letter from word3

This post will guide you how to extract first letter from each word in a given cell in Excel. How do I extract the first letter of each word in a range of names in your current worksheet in Microsoft ...

How to ignore Blank Cells while Concatenating cells in Excel
concatenate cell but blanks3

This post will guide you how to concatenate cells but ignore all blank cells in your worksheet in Excel. How do I concatenate cells but ignore blank cells with a formula in Excel. How to create a concatenate formula to ...

How to Get the Maximum or Minimum Absolute Value in Excel
Get the Maximum or Minimum Absolute Value 10

It is easy to find the maximum or minimum value in a batch of data in excel, but if this batch of numbers contains both positive and negative numbers, the maximum or minimum absolute value cannot be found out by ...

How to Count Only Numbers in Bold in a Range of Cells in Excel
Count Only Numbers in Bold in a Range of Cells2

This post will guide you how to Count only numbers with bold style in a range of cells in Excel. How do I Count on cells with bold font within a range of cells using User defined function in Excel ...

How to Sum Only Numbers in Bold in a Range of Cells in Excel
Sum Only Numbers in Bold in a Range of Cells2

This post will guide you how to sum only numbers with bold style in a range of cells in Excel. How do I sum on cells with bold font within a range of cells using User defined function in Excel ...

How to Filter Formula in Excel
filter formula4

This post will guide you how to filter your data with an Formula in Excel. How do I filter cells with formulas through a User defined function in Excel 2013/2016. Filter Formula Assuming that you have a list of data ...

How to Count Cells by Font Color in Excel
count cells by font color2

This post will guide you how to count cells by font color in Excel. How do I Count the number of cells with specific cell Font color by using a User Defined function in Excel. Count Cells by Font Color ...

How to Highlight Cells Containing Formulas in Excel
highlight cells contain formula7

This post will guide you how to highlight cells in which contain formulas using Conditional Formatting feature in Excel. How do I conditionally format a cell if it contains formula using a User defined function in combination with Conditional Formatting ...

How to Extract Number from Text String in Excel
extract number from text string3

This post will guide you how to extract number from a given test string in Excel. How do I extract all numbers from string using a formula in Excel. How to get all number from a given test string using ...

How to Filter Data with Strikethrough Format in Excel
filter data with strikethrough format12

This post will guide you how to filter or delete rows with strikethrough format in your selected range of cells in Excel. How do I Filter by strikethrough formatted text with Find and Replace function in Excel 2013/2016. Or how ...

Sidebar