# How to get every nth row in Excel

Keep the rows whose position divides by n: `=FILTER(A2:B13,MOD(SEQUENCE(ROWS(A2:A13)),E1)=0)` returns every 3rd row when `E1` is 3.

**Excel:** `=FILTER(A2:B13,MOD(SEQUENCE(ROWS(A2:A13)),E1)=0)` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Date | Meter reading |  | Every | 3 |
| 2026-03-01 | 14820 |  |  |  |
| 2026-03-02 | 14876 |  |  |  |
| 2026-03-03 | 14931 |  |  |  |
| 2026-03-04 | 14990 |  |  |  |
| 2026-03-05 | 15052 |  |  |  |
| 2026-03-06 | 15108 |  |  |  |
| 2026-03-07 | 15160 |  |  |  |
| 2026-03-08 | 15219 |  |  |  |
| 2026-03-09 | 15277 |  |  |  |
| 2026-03-10 | 15330 |  |  |  |
| 2026-03-11 | 15392 |  |  |  |
| 2026-03-12 | 15449 |  |  |  |

Formula in D3: `=FILTER(A2:B13,MOD(SEQUENCE(ROWS(A2:A13)),E1)=0)`

Result (spills 4 × 2): 3/3/2026, 14,931; 3/6/2026, 15,108; 3/9/2026, 15,277; 3/12/2026, 15,449

## How it works

SEQUENCE numbers the rows of the data 1 to 12. MOD gives the remainder after dividing each number by 3, which is 0 for rows 3, 6, 9 and 12. FILTER keeps those rows. Change `E1` to 2 for every other row.

## Other ways

- `=CHOOSEROWS(A2:B13,SEQUENCE(ROWS(A2:A13)/E1,1,E1,E1))`: Builds the row numbers 3, 6, 9, 12 directly and picks those rows.
- `=FILTER(A2:B13,MOD(SEQUENCE(ROWS(A2:A13))-1,E1)=0)`: Subtract 1 to start from the first row instead. (Rows 1, 4, 7 and 10: March 1, 4, 7 and 10.)

## Common mistakes

- Using `ROW(A2:A13)` instead of SEQUENCE counts from the sheet's row 1, so the picks shift by the header rows. Subtract `ROW(A1)` if you use ROW.
- Sorting the source changes which rows are picked, since the positions are counted fresh each time.

## Questions

**How do I get every other row?**

Set n to 2: `=FILTER(A2:B13,MOD(SEQUENCE(ROWS(A2:A13)),2)=0)`, or `=1` for the odd rows.

**How do I sum every nth row?**

Wrap the filtered column in SUM: `=SUM(FILTER(B2:B13,MOD(SEQUENCE(ROWS(B2:B13)),E1)=0))`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/get-every-nth-row
