Function Problems

Calculate the Geometric Mean of Every Fifth Cell in Excel

Adam DavisAdam Davis Nov 20, 2026 870 views

Question details

Calculate the geometric mean of every fifth cell in a row, excluding blank and nonpositive values.

Calculate the Geometric Mean of Every Fifth Cell in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to aggregate regularly spaced values in an Excel row and account for changes to the data.
Observed behavior
Blank or nonpositive cells should be ignored, and the formula should select cells at five-column intervals from the starting cell.
Before you start

Identify the first cell to include and the full row range to examine. The example below starts at F3 and uses every fifth cell through NB3; place the formula outside that range.

Solution 1Recommended

Use GEOMEAN with COLUMN and MOD to select every fifth cell

Use this formula to calculate the geometric mean of positive values at five-column intervals.

The formula selects F3, K3, P3, and so on. MOD and COLUMN identify the positions, while IF excludes blank and nonpositive values.

If columns are inserted within the range, the formula continues to select every fifth position from the starting cell. It does not preserve the original selected records if their positions change.

1
Select an output cell

In Excel, click an empty cell outside F3:NB3 where you want the result to appear.

2
Enter the formula

In the formula bar, enter =GEOMEAN(IF(MOD(COLUMN(F3:NB3)-COLUMN(F3),5)=0,IF(F3:NB3>0,F3:NB3,""),"")) and adjust both range references and the starting-cell reference to match your data.

3
Confirm the formula

Press Enter in current versions of Excel. In older versions, press Ctrl+Shift+Enter to enter it as an array formula; do not type the surrounding braces yourself.

4
Check the result

Review the selected positions in the row and confirm that at least one contains a positive number. If none do, GEOMEAN returns a #NUM! error.

Use GEOMEAN with COLUMN and MOD to select every fifth cell
Track records after insertions: If you need to retain the same records after inserting columns, use a separate label or other identifier to select those records instead of relying only on every fifth position.
Calculate in WPS Spreadsheets

Calculate every fifth value in WPS Spreadsheets

Use the same GEOMEAN, MOD, COLUMN, and IF formula in WPS Spreadsheets to calculate the geometric mean of regularly spaced positive values.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Choose an output cell: Click a blank cell outside the data range, such as a cell outside F3:NB3.
  3. 3. Enter the formula: Enter =GEOMEAN(IF(MOD(COLUMN(F3:NB3)-COLUMN(F3),5)=0,IF(F3:NB3>0,F3:NB3,""),"")) in the formula bar, changing the references to fit your row.
  4. 4. Confirm and check: Press Enter, or Ctrl+Shift+Enter if your version requires array-formula entry. Check that the selected positions contain at least one positive value.
Calculate the geometric mean of every fifth cell while excluding blanks and nonpositive valuesOpen and edit Microsoft Excel XLSX filesWork with spreadsheet formulas in a familiar interface
microsoft office alternative - wps office

Frequently Asked Questions

Which cells does the example formula include?

Starting with F3, it checks F3, K3, P3, and every fifth column after that through NB3. Change F3 in both COLUMN(F3) and the range references to use a different starting cell.

Why does the formula return #NUM!?

GEOMEAN returns #NUM! if there are no positive numeric values among the selected cells. Check the cells at five-column intervals and make sure at least one contains a positive number.

Should I replace blank cells with 1?

No. A 1 would be included in the geometric mean and could change the result. The IF conditions in the formula exclude blank and nonpositive cells instead.

What happens if I insert a column in the data range?

The formula selects every fifth position from the starting cell after the insertion, so the original selected records may change. Use record labels or another identifier if you need to preserve the same records.