Function Problems

How to Average Non-Zero Cells at Row Intervals in Excel

Tauseeq MagsiTauseeq Magsi Oct 29, 2026 868 views

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.

How to Average Non-Blank, Non-Zero Cells at Row Intervals in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select a target cell

Click on an empty cell where you want the calculated average to appear.

2
Enter the array formula

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.

3
Confirm the formula

Press Ctrl + Shift + Enter to apply it as an array formula. The formula will be surrounded by curly brackets { } in the formula bar.

Use an Array Formula with AVERAGE, IF, MOD, and ROW
Modern Excel Versions: If you are using Microsoft 365 or modern WPS Office versions with dynamic arrays, you can simply press Enter to apply this formula without needing the Ctrl + Shift + Enter shortcut.
Efficient Spreadsheet Alternative

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. 1. Download WPS Office: Install the free WPS Office suite on your computer or mobile device.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing Excel workbook containing the interval data.
  3. 3. Apply the Formula: Use the exact same MOD and ROW formulas as instructed above to seamlessly average your non-zero cells.
Fully compatible with Microsoft Excel formulas and functions (xlsx formats).Seamlessly handle advanced array formulas and dynamic cell references.Lightweight, free-to-use office suite with a familiar and intuitive interface.
microsoft office alternative - wps office

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.