How to☝️ Ignore Zeros When Averaging Cells in Google Sheets

To ignore zeros when averaging cells in Google Sheets, use the following custom formula: “=AVERAGEIF(B1:B5, “<>0”)” where “B1:B5” is your cell data range.

In this article, we’re going to break down, step-by-step, how you can apply this custom formula to your data.

Why the AVERAGE Function Doesn’t Cut It

Well, the answer is simple.

When you apply the AVERAGE function in Google Sheets, you count in zeros, which may end up skewing your data depending on your goals.

Here’s how it works in practice:

How to Ignore Zeros When Averaging Cells in Google Sheets

That’s why whenever you need to skip zeros completely, you need to deploy the AVERAGEIF function that allows you to apply the IF statements blocking out zero values when averaging your values.

And the beauty of this method is that it’s ridiculously easy to use. Just follow the steps below.

How to Exclude Zeros When Averaging Cell Values

As mentioned above, to exclude zero values when averaging in Google Sheets, here’s how you can deploy the AVERAGEIF function.

  1. Select any empty cell where you want Google Sheets to return the function output.
  2. Type “=AVERAGEIF(B1:B5, “<>0”) into the Formula bar and type Enter.

Once there, you get the result without accounting for the zero values within the data range you picked.

How to Exclude Zeros When Averaging Cell Values

If you’re curious about how the customized version of the AVERAGEIF function works, here’s the breakdown:

  • By design, the AVERAGEIF function returns the average value depending on criteria. Alternatively, we could have used the AVERAGEIFS function to achieve the same outcome.
  • B1:B5” is the cell range the function runs through and applies to the conditions specified in the second part of AVERAGEIF.
  • <>0” is the second part of the equation where we use the Google Sheets Does Not Equal operator to signify that we don’t want to count in zero values when averaging the values within the specified cell range.

How to Ignore the “#DIV/0!” Error When Averaging Values

To ignore the divide by zero error (#DIV/0!) when averaging values in Google Sheets, use the following function:

=AVERAGEIF(B1:B5, “<>#DIV/0!”)

This modification of the AVERAGEIF function ignores all the instances of the #DIV/0 error in your data set, helping you complete the averaging process without triggering an error.

The AVERAGEIF Function

Now, over to you. By following these simple steps, you can easily average values without skewing your results when you have a bunch of zero values in your data set.

More Google Sheets Tutorials
More Microsoft Excel Tutorials
Share This Post
Daniel Smith
Daniel Smith
Daniel Smith is automation consultant with a passion for technology, data, AI, and machine learning. Daniel loves to learn about new technologies and how they can be applied to solve complex problems. He is also a big fan of productivity hacks and enjoys finding ways to automate tasks to make organizations more efficient.