How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank? 2

How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?

Google Sheets is a powerful tool that allows users to create and manipulate data in a spreadsheet format. One of its useful features is the ability to calculate the average of a range of cells, while excluding any cells that are blank. This can be done by using the AVERAGE function, which calculates the average of a given range of cells. To exclude blank cells, the function can be combined with the IF function, which allows us to specify a condition. By setting the condition to only include cells that are not blank, the AVERAGE function will only calculate the average of the non-blank cells in the specified range. This functionality is useful for data analysis and allows for accurate calculations without the interference of empty cells.

Google Sheets: Calculate Average If Not Blank


You can use the following formula to calculate the average value of a range in Google Sheets only if every cell in the range is not blank:

=IF(COUNT(A1:A10),AVERAGE(A1:A10),0)

This formula calculates the average value of cells in the range A1:A10. If every value in the range is blank, then the formula simply returns 0.

You could also use the following formula to return a blank instead:

=IF(COUNT(A1:A10),AVERAGE(A1:A10),"")

The following examples show how to use these formulas in practice.

Example 1: Average If Not Blank (Return a Value)

The following screenshot shows how to calculate the average value in column B where there are only a few missing values:

Since there were only a few missing values, the formula simply returned the average of the non-missing values.

Example 2: Average If Not Blank (Return a Zero)

The following screenshot shows how to calculate the average value in column B where every single value is missing:

Since every single value was missing in column B, the formula simply returned a value of 0.

Example 3: Average If Not Blank (Return a Blank)

The following screenshot shows how to calculate the average value in column B where every single value is missing:

Additional Resources

Cite this article

stats writer (2024). How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-the-average-of-a-range-of-cells-excluding-any-cells-that-are-blank/

stats writer. "How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-the-average-of-a-range-of-cells-excluding-any-cells-that-are-blank/.

stats writer. "How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-the-average-of-a-range-of-cells-excluding-any-cells-that-are-blank/.

stats writer (2024) 'How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-to-calculate-the-average-of-a-range-of-cells-excluding-any-cells-that-are-blank/.

[1] stats writer, "How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.

stats writer. How can I use Google Sheets to calculate the average of a range of cells, excluding any cells that are blank?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
PDF
Scroll to Top