Arte SheetsLearn. Try. Understand.

Math

Sum every Nth row: total periodic intervals with MOD, ROW, and SUMIF

Tag every Nth row cleanly with MOD(ROW - FirstRow + 1, N) and total matching cycle rows with SUMIF.

Why relative 1-based row offsets matter

Testing MOD(ROW(B2), 3)=0 depends on where your table sits on the worksheet—if data starts on Row 2, worksheet row 3 is actually your SECOND data row, not your third!

Normalizing the row index first with ROW(B2) - ROW($B$2) + 1 guarantees the data rows always count 1, 2, 3, 4, 5, 6 regardless of header height. Taking MOD(..., StepN) produces 0 on every Nth data row.

Month (A)Sales (B)CycleRem (C)StepN (E2)
Jan10013
Feb1202
Mar (3rd)1500
Apr1101
May1302
Jun (6th)1800

Total every 3rd row (or switch N dynamically)

With StepN = 3 in E2, March (150) and June (180) have remainder 0, so SUMIF(C2:C7, 0, B2:B7) totals 330. Changing E2 to 2 immediately totals Feb + Apr + Jun (120 + 110 + 180 = 410).

=SUMIF(C2:C7, 0, B2:B7)

Sum every Nth row starting at row 1 instead of row N

To sum rows 1, 4, 7... (Jan + Apr = 100 + 110 = 210), match CycleRem = 1 instead of 0.

For N=1 every remainder is zero. To start at the first row for any positive integer N, compare the helper remainder with MOD(1,N), rather than always comparing with 1. Reject zero or negative N.

=SUMIF(C2:C7, 1, B2:B7)

Try the example

Use the original values or change them to test your understanding.

Further reading