How to Average Noncontiguous Excel Cells While Ignoring Zero Values
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.

- 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.
Identify the exact cell references containing your data and ensure you know how to select multiple scattered cells using the Ctrl key.
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.
Hold down the Ctrl key on your keyboard and click each individual cell you want to include in your average calculation.
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.
Click the cell where you want the final average to appear. Type the formula =AVERAGEIFS(DataRange, DataRange, "<>0") and press Enter.

Combine AVERAGE and IF Functions in an Array
If you prefer not to create a Named Range, you can manually build an array formula using AVERAGE and IF to bypass zeroes in specific cells.
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. Open your data file: Launch WPS Spreadsheet and open the workbook containing your numerical data.
- 2. Select the scattered cells: Hold the Ctrl key and select the specific, non-adjacent cells you want to average.
- 3. Define the range name: Click the Name Box, type 'DataRange', and hit Enter.
- 4. Input the formula: Type =AVERAGEIFS(DataRange, DataRange, "<>0") in your result cell to get an accurate average instantly.

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.




