This post will guide you how to **average a range of cells and ignoring all zero values** in Excel. How do I Average numbers in a given range and ignore zero values with a formula in Excel. How to ignore zero when averaging a range of data in Excel.

## Average a Range and Ignore zero

Assuming that you have a list of data in range B1:B4, which contain numbers. And you want to get the average value of those values, but excluding all zero values. How to do it. You can use a formula based on the AVERAGEIF function to ignore zero when taking an average in Excel. Like this:

**=AVERAGEIF(B1:B4,"<>0")**

Type this formula into a blank cell and press **Enter** key on your keyboard. Then it would return the average result which has ignored all zero values.

Let’s see how this formula works:

The AVERAGEIF function will perform an average based on your criteria, the values should not equal to zero value. And it will ignore all blank cells and text or zero values.

You can also use another formula to achieve the same result of calculating an average value for a given range ignoring zero values. Like this:

**=SUM(B1:B4)/COUNTIF(B1:B4,">0")**

Type this formula into a blank cell and press **Enter** key on your keyboard.

### 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 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])….
- Excel COUNTIF function

The Excel COUNTIF function will count the number of cells in a range that meet a given criteria. This function can be used to count the different kinds of cells with number, date, text values, blank, non-blanks, or containing specific characters.etc.= COUNTIF (range, criteria)…

Related Posts

Average per Week by Formula in Excel
We usually apply AVERAGE function or relevant functions to return average directly in Excel worksheet. But in some situations, only applying average relevant functions cannot figure out our problem. Sometimes we can create a formula with functions and mathematical operation ...

How to Sum if Contains an Asterisk
To add numbers together we need to apply SUM function. And if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. If ...

How to Sum in Vertical Range
If we want to add numbers based on some conditions in Excel worksheet, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. In this article, we will introduce you the method ...

How to Sum in Horizontal Range
To add numbers together we need to apply SUM function. But if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. In ...

How to Sum with Criteria and Or Logic in Excel
To add numbers together we need to apply SUM function. And if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. If ...

How To Sum the Largest N Values in Excel
Sometimes we may want to sum the largest N numbers or top N numbers in a range. In this article, we will show you the method of “SUM the Largest N Numbers” by a simple formula which consist of SUMPRODUCT ...

How to Sum for Cell Contains Formula Only in Excel
Sometimes values are created by formulas in cells. If we want to sum values which are created by formulas from a range, but some values which are hardcoded also list in the same range, how can we filter out matched ...

How to Sum the Smallest N Values in Excel
Sometimes we may want to sum the first smallest N numbers in a range in Excel. In this article, we will show you the method of “SUM the Smallest N Numbers” by a simple formula which consist of SUMPRODUCT and ...