How to Average Non-Zero Cells at Row Intervals in Excel
Question details
The user needs a formula to calculate the average of specific cells occurring at regular intervals (e.g., every 6 rows) while ignoring 0 values and blank cells.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating a precise average for non-continuous data points that appear at fixed intervals down a column, without manually selecting each cell.
- Observed behavior
- The goal is to yield an accurate average involving only the target interval cells, explicitly skipping any blanks or zeroes to prevent skewing the final average calculation.
Identify the exact starting cell, the ending cell of your range, and the numerical interval (e.g., every 6th row) you need to evaluate before writing the formula.
Use an Array Formula with AVERAGE, IF, MOD, and ROW
This method dynamically evaluates the row intervals mathematically and ignores zero or blank values automatically, making it highly efficient for evenly spaced ranges.
By utilizing the MOD and ROW functions, the formula can identify which rows match the interval you require without needing manual selection. The nested IF function then excludes 0 values and blanks.
Because this involves evaluating arrays of data simultaneously, older versions of spreadsheet software require it to be entered as an array formula.
Click on an empty cell where you want the calculated average to appear.
Type the formula: =AVERAGE(IF(MOD(ROW(F7:F43)-ROW(F7)+1,6)=1,IF(F7:F43<>0,F7:F43))) into the formula bar. Replace F7:F43 with your actual range and '6' with your specific row interval.
Press Ctrl + Shift + Enter to apply it as an array formula. The formula will be surrounded by curly brackets { } in the formula bar.

Use Helper Cells with SUMPRODUCT and INDIRECT
This solution is best for users who prefer to list their target cells explicitly rather than relying on mathematical row evaluations.
Combine Explicit Cell References using CHOOSE and AVERAGE
A direct, non-helper-cell approach suited for a small, manageable number of target interval cells.
Easily Calculate Complex Averages with WPS Office
WPS Spreadsheet fully supports advanced array formulas, MOD functions, and INDIRECT calculations, allowing you to quickly calculate averages across row intervals just like in Excel.
- 1. Download WPS Office: Install the free WPS Office suite on your computer or mobile device.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook containing the interval data.
- 3. Apply the Formula: Use the exact same MOD and ROW formulas as instructed above to seamlessly average your non-zero cells.

Frequently Asked Questions
Why did my MOD and ROW formula return a #VALUE! error?
If you are using an older spreadsheet version, omitting the 'Ctrl + Shift + Enter' keystroke when inputting an array formula will result in a #VALUE! error. Make sure to use this shortcut to properly evaluate the array.
Can I average every Nth column instead of rows?
Yes. You can substitute the ROW() function with the COLUMN() function in the array formula to evaluate and average columns at regular intervals instead of rows.
How does the MOD function help in picking interval cells?
The MOD function calculates the remainder of a division. By dividing the row number by your interval size (e.g., 6) and checking for a specific remainder (like 1), it accurately flags every Nth row for calculation.
Does WPS Spreadsheet support complex array formulas?
Absolutely. WPS Spreadsheet supports all standard array formulas exactly like Microsoft Excel, including combinations of AVERAGE, IF, MOD, and ROW functions.




