How to Calculate Average Ignore Non-Numeric Values and Errors

In daily work we often need to calculate the average of some numbers in a range for further analysis. Thus, we need to know some basic functions of calculate average in Excel. From now on, we will introduce you some basic functions like AVERAGE, AVERAGEIF, and show you some common formulas to calculate average value.

In this article, we will let you know how to calculate average by AVERAGE function easily and the way to calculate average based on a given criteria by AVERAGEIF function. We will introduce you the syntax, arguments, and basic usage about the two functions, and let you know the working process of our created formulas.

EXAMPLE

How to Calculate Average Ignore Non-Numeric Values and Errors 1

Refer to “Numbers” column, some numbers are listed in range A2:A11. C2 is used for entering a formula which can calculate the average of numbers in range A2:A11. In fact, Excel has amount of built-in functions and they can execute most simple calculations properly, and AVERAGE is one of the most common used functions.

In C2, enter “=AVERAGE(A2:A11)”.

How to Calculate Average Ignore Non-Numeric Values and Errors 2

Then press Enter, AVERAGE function returns 63.8.

How to Calculate Average Ignore Non-Numeric Values and Errors 4

You can adjust decimal places by “Increase Decimal” or “Decrease Decimal” in “Number” section.

How to Calculate Average Ignore Non-Numeric Values and Errors 4

But if some errors or blank or non-numeric values exist in the list, how can we only calculate average for numbers ignoring the invalid values?  See example below.

How to Calculate Average Ignore Non-Numeric Values and Errors 5

We get an error when calculating average for range A2:A11, the difference is there are some invalid values in the list. To calculate average ignoring the errors, that means we need to calculate average of numbers in a range with one or more criteria, thus, we can apply AVERGAEIF function instead of basic AVERAGE function.

CREATE A FORMULA with AVERAGEIF FUNCTION

1. STEPS

Step 1: In C2, enter the formula =AVERAGEIF(A2:A11,”>0″).

How to Calculate Average Ignore Non-Numeric Values and Errors 6

You can also name range “Numbers” for A2:A11, then you can enter =AVERAGEIF(Numbers,”>0″).

Step 2: Press Enter after typing the formula.

How to Calculate Average Ignore Non-Numeric Values and Errors 7

Ignore the improper cells, and only calculate the average of numbers 54, 40, 88, 76, 100, 90 and 44, total 7 numbers. (54+40+88+76+100+90+44)/7=70.3. The formula works correctly.

2. FUNCTION INTRODUCTION

AVERAGEIF function is AVERAGE+IF. It returns the average of some numbers in a range based on given criteria.

Syntax:

=AVERAGEIF(range, criteria, [average_range])

It supports wildcards like asterisk ‘*’ and question mark ‘?’, also supports logical operators like ‘>’,’<’. If wildcards or logical operators are required, they should be enclosed into double quotes (““), in this case we entered “>0” to show the criteria.

3. ALL ARGUMENTS

AVERAGEIF – RANGE

This example is very simple, we have only one list. A2:A11 is criteria range and average range.

In the formula bar, select “A2:A11”, press F9, values in this range are expanded in an array.

How to Calculate Average Ignore Non-Numeric Values and Errors 8

If average range=criteria range, average range can be omitted.

AVERAGEIF – CRITERIA

Obviously, the criteria in our case is “>0”, this condition can filter numbers from criteria range.

4. HOW THE FORMULA WORKS

After expanding values, the formula is displayed as:

=AVERAGEIF({54;40;#N/A;88;”ABC”;76;0;100;90;44},”>0″)

Note: blank cell is recorded as 0 in the array.

Because of criteria “>0”, so invalid cells are ignored. Replace all invalid values with 0. Keep all numbers.

{54;40;#N/A;88;”ABC”;76;0;100;90;44} -> {54;40;0;88;0;76;0;100;90;44}

Now this new array only contains numbers. We can calculate the average now.

SUMMARY

1. AVERAGE function is used for returning the average of some numbers in Excel.

2. AVERAGEIF function returns the average of some numbers refer to given criteria.

3. For argument, if range=average range, average range can be omitted.

4. AVERAGEIF can support wildcards, logical operators.

Related Functions


  • Excel AVERAGE function
    The Excel AVERAGE function returns the average of the numbers that you provided.The syntax of the AVERAGE function is as below:=AVERAGE (number1,[number2],…)….
  • Excel AVERAGEIF function
    The Excel AVERAGEAIF function returns the average of all numbers in a range of cells that meet a given criteria.The syntax of the AVERAGEIF function is as below:= AVERAGEIF (range, criteria, [average_range])….

 

Related Posts

Extract Unique Items From A List
Extract Unique Items From A List In Excel1

This post will guide you how to extract unique itmes from a given list in Microsoft Excel. How to create a newly formula to get unique values from a range cells in Excel. The unique list of items is the ...

Extract substring In Excel
Extract substring In Excel1

This post will guide you how to use Excel's MID function is a quick and easy way to extract pieces from your text. Use the Excel formula to extract a substring with MID. Note: If you want to extract just ...

How to Use 3D SUM Multiple Worksheets
3D sum multiple worksheets1

To sum a range of numbers is straightforward for most Excel users, but do you know how to establish a 3D reference to total the same range of numerous sheets. In this post, I will present the steps for this ...

Extract all the matches with helper Column
how to extract all matches with helper column1

With Excel's powerful functions IF, INDEX, and MATCH, we can find exactly what you're looking for with a few clicks of the mouse. This step-by-step tutorial will show how easy it is to extract data using these tools and more! ...

If Cell is This Value or That Value

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of logical test. If you want to see if a cell is A or B, and if one of ...

If Value is Greater Than A Certain Value
If Value is Greater Than A Certain Value 1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the logical test result. If you want to see if a value in one cell is greater than a specific value, ...

If Cell is Not Blank
If Cell is Not Blank 6

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell is Blank
If Cell is Blank_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell Equals Certain Text String
If cell equals certain text_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if cell equals a certain text string like “Win”, you ...

If Cell Contains Either Text1 or Text2
If cell contains text1 or text2_1

IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to see if cell contains certain substring1 like “abc” or substring2 like “def”, and returns true ...

Sidebar