Function Problems

How to Average Noncontiguous Excel Cells While Ignoring Zero Values

Camila MilosovichCamila Milosovich Nov 10, 2026 869 views

Question details

The user needs to calculate the average of selected, non-adjacent cells in a spreadsheet without including any cells that contain zero values.

How to Average Noncontiguous Excel Cells While Ignoring Zero Values
Product
Spreadsheet
Device & OS
not provided
Scenario
Calculating accurate statistical averages from scattered data points where zero values represent missing or inapplicable data and should not skew the final result.
Observed behavior
Standard AVERAGE functions include zero values, which lowers the calculated average. The user requires a formula setup that dynamically skips over these zeroes while handling scattered cells.
Before you start

Identify the exact cell references containing your data and ensure you know how to select multiple scattered cells using the Ctrl key.

Solution 1Recommended

Use AVERAGEIFS with a Named Range

By grouping noncontiguous cells into a Named Range, you can easily use the AVERAGEIFS function to exclude zero values across the entire selection.

The AVERAGEIFS function requires a contiguous range or a formally defined Named Range to work properly. Applying a name to scattered cells is the cleanest way to evaluate them.

1
Select your noncontiguous cells

Hold down the Ctrl key on your keyboard and click each individual cell you want to include in your average calculation.

2
Create a Named Range

With the cells selected, click into the Name Box located to the left of the formula bar. Type a name like DataRange (without spaces) and press Enter.

3
Apply the AVERAGEIFS formula

Click the cell where you want the final average to appear. Type the formula =AVERAGEIFS(DataRange, DataRange, "<>0") and press Enter.

Use AVERAGEIFS with a Named Range
Blank Cells Ignored Automatically: In addition to ignoring zeroes, the AVERAGEIFS formula inherently ignores empty or blank cells, ensuring an accurate calculation.
Efficient Data Analysis

Analyze and Average Complex Data with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, AVERAGEIFS logic, and Named Ranges, making it effortless to calculate averages from scattered data points while bypassing zero values. It offers a smooth, reliable experience for all complex data tasks.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your numerical data.
  2. 2. Select the scattered cells: Hold the Ctrl key and select the specific, non-adjacent cells you want to average.
  3. 3. Define the range name: Click the Name Box, type 'DataRange', and hit Enter.
  4. 4. Input the formula: Type =AVERAGEIFS(DataRange, DataRange, "<>0") in your result cell to get an accurate average instantly.
Fully compatible with Microsoft Excel formulas and .xlsx file formats.Supports dynamic array formulas and complex conditional calculations out of the box.Features an intuitive Name Box for easily managing scattered data sets.Free, lightweight, and fast alternative to heavy spreadsheet programs.
microsoft office alternative - wps office

Frequently Asked Questions

Will AVERAGEIFS ignore empty cells as well as zero values?

Yes. When you use the criteria "<>0" inside the AVERAGEIFS function, it inherently excludes completely blank cells in addition to cells explicitly containing a zero.

Why do I get an error when I list separated cells with commas in the AVERAGEIFS formula?

The AVERAGEIFS function does not natively accept separated individual cell references (like A1, B3, C5) as its range argument. You must group those scattered cells into a single Named Range first or use an array format with curly brackets inside an IF statement instead.

How do I remove or edit a Named Range I created for this formula?

To manage your Named Ranges, navigate to the Formulas tab on the top ribbon and click on 'Name Manager'. From there, you can edit the cell references included in your range or delete the name entirely.