How to Sum Every Nth Row in Google Sheets
To sum every nth row in Google Sheets, you can use a combination of SUM and ARRAYFORMULA functions. Here's a step-by-step guide on how to do it.
- Open your Google Sheet with the data you want to sum.
- Choose a cell where you want the sum to appear (e.g., E1).
- In that cell, enter the formula to sum every nth row. Replace "n" with the desired interval and "range" with the range of cells containing the data.
Formula:
=SUM(ARRAYFORMULA(IF(MOD(ROW(range)-ROW(INDEX(range,1,1)),n)=0,range,0)))
For example, if you want to sum every 3rd row in the range A1:A10, you would use the following formula:
=SUM(ARRAYFORMULA(IF(MOD(ROW(A1:A10)-ROW(A1),3)=0,A1:A10,0)))
- Press Enter to apply the formula, and the sum of every nth row will appear in the chosen cell.
Example
Let's say you have the following data in column A (A1:A10):
10
20
30
40
50
60
70
80
90
100
You want to sum every 2nd row, so you would enter the following formula in cell E1:
=SUM(ARRAYFORMULA(IF(MOD(ROW(A1:A10)-ROW(A1),2)=0,A1:A10,0)))
After pressing Enter, cell E1 will display the sum of every 2nd row: 20 + 50 + 80 + 100 = 250.
Did you find this useful?