Yes. In Microsoft Excel for Microsoft 365 on Windows, add a helper column to mark every xth data row, filter for those marks, and delete the visible rows. This makes the interval easy to check before removal and is safer than selecting rows by hand.
What “every x row” can mean
The phrase can describe two different tasks: deleting every xth row, or deleting x rows at a time. This guide covers the usual meaning: remove one row after each group of x records. For example, deleting every third data row removes records 3, 6, 9, and so on. It does not remove three rows at a time.
Decide whether the count starts at the first data record or at a particular worksheet row. If row 1 contains headings and records start in row 2, counting from the first record means row 2 is record 1, row 3 is record 2, and row 4 is record 3. That distinction matters: worksheet row numbers and data-record positions are not the same when a header is present.
Also decide what to do with an incomplete group at the bottom. If there are 11 records and you remove every fourth record, the matching positions are 4 and 8; there is no 12th record to remove. Excel will not invent a row to complete the group.
Use a helper column to mark rows
A helper column is a dependable choice when you want to inspect the target rows before deleting them. It works with ordinary ranges and Excel tables, and you can change the interval without rebuilding the method.
- Put the interval number in a spare cell, such as E1. Enter 3 there to mark every third data record.
- Assume the data begins in row 2, with records in A2:D100, and use column E as the helper column. Add a heading such as Remove? in E1 only if you place the interval somewhere else; do not use the same cell for both the heading and interval.
- With the interval in F1 and the helper heading in E1, enter the following in E2. The formula counts records from the first data row and returns TRUE on each interval boundary.
With data records beginning at A2 and the interval number in F1, enter this formula in E2, then fill it down alongside the records:
=MOD(ROWS($A$2:A2),$F$1)=0
For an interval of 3, E2 is FALSE, E3 is FALSE, E4 is TRUE, and E5 is FALSE. The TRUE marks therefore identify the third, sixth, ninth, and later records. The formula uses the height of a growing range, so it keeps counting correctly when copied down. The values in column A do not have to be numbers, but the data rows should be continuous; the formula counts rows even if a cell in column A is blank.
If the records start on a different row, adjust both references to the first data row. For example, if row 5 is the first record, use A5 as the fixed starting reference and put the formula in the helper cell on row 5. The interval cell must contain a positive whole number. A blank cell or zero is not a useful interval and can cause a division error.
Filter and delete only the marked records
Once the helper column displays TRUE and FALSE, use Excel’s filter to isolate the rows marked for removal. On Windows, select a cell in the data range and choose Data > Filter. You can also use Ctrl+Shift+L to toggle filters. In the helper column’s filter menu, clear the selection and select TRUE.
Check the filtered records before removing them. Confirm the first few targets are at the expected positions and that the header remains visible. Then select the visible data rows to remove, not the heading. If selecting the row numbers, make sure the selection corresponds only to the filtered visible records. Another cautious approach is to select the visible cells in the filtered data range, choose Home > Find & Select > Go To Special > Visible cells only, and then delete the selected sheet rows using Home > Delete > Delete Sheet Rows. Excel for Mac has the same filtering and deletion commands in the ribbon; keyboard shortcuts can differ, so use the ribbon paths if a Windows shortcut does not work.
After deletion, clear the filter and verify the remaining records. Remove the helper column and the interval value when you are satisfied with the result. If the data is formatted as an Excel table, you can filter its helper column in the same way; make sure the operation removes table data rows rather than merely clearing their cell contents.
Return a cleaned copy with a formula
If you want to retain the original data, produce a separate result instead of deleting rows. In Microsoft 365 or Excel 2021 and later, FILTER and SEQUENCE can spill the records that do not fall on the selected interval. This is useful for creating a clean copy for review, while leaving the source unchanged.
Assume the records occupy A2:D10, the interval number is in F1, and you want the result to begin in H2. Enter this formula in H2:
=FILTER(A2:D10,MOD(SEQUENCE(ROWS(A2:A10)),$F$1)<>0)
With 9 records and 3 in F1, the formula returns records 1, 2, 4, 5, 7, and 8: six rows, with records 3, 6, and 9 excluded. The formula counts the first row of the selected range as record 1, regardless of its worksheet row number. Keep the output area empty so the spilled results have room, and do not place the formula inside the source range. If you need to replace the original data, copy the results and use Paste Special > Values after checking that the output is correct.
This formula creates a result; it does not delete source rows. FILTER and SEQUENCE are available in Microsoft 365 and Excel 2021 or later, but the formula will not provide the same experience in older Excel versions. For a workbook that needs to work in older versions, use the helper-column and filter method.
Choose the method that fits the task
Use the helper-column method when you need to physically remove rows and want a visible audit trail before deletion. It is also straightforward when the interval may change or when a colleague needs to review which records were marked.
- Helper column and filter: best for controlled, permanent deletion; easy to verify and works in older Excel versions.
- FILTER formula: best for a reversible cleaned copy; the source stays intact, but the result updates when the source or interval changes.
- Manual row selection: reasonable for a very small, obvious set of records, but error-prone for long lists or changing intervals.
Deleting rows changes the worksheet itself. Any formulas, charts, or references that depend on the deleted records may recalculate or change, and linked data may no longer line up as expected. A separate formula output is a better first step when you are unsure about those consequences.
Common mistakes and how to avoid them
- Counting the heading as a record: start the formula at the first data row, not at the header. Otherwise the removal pattern shifts by one.
- Using worksheet row numbers as the interval count: a formula based directly on ROW can select different records when the data starts lower down. Counting rows from the first record avoids that offset.
- Deleting the wrong filter result: filter for TRUE only after confirming that TRUE means “remove” in your helper column. If you reverse the formula’s condition, the meaning reverses too.
- Selecting hidden rows by accident: filtered lists contain hidden records. Work with visible cells or visible row selections, and check the selection before deleting.
- Expecting the count to restart after a blank row: the helper formula counts worksheet rows from its starting point. A blank within the list does not reset the interval. If separate sections need separate counts, handle each section independently or add a formula designed to identify section boundaries.
- Using a changing or unsorted list: the nth record depends on the current row order. Sort or arrange the data first if the intended pattern follows a particular ordering, and avoid sorting between marking and deletion.
For an extra safeguard, save a copy of the workbook before permanent deletion. You can also copy the filtered target rows to another sheet first; that gives you a record of what the helper marked and makes it easier to compare before and after.
Frequently Asked Questions
How do I delete every third row in Excel?
Start with the first data row, add a helper formula that counts records from that row, and set the interval cell to 3. Filter the helper column for TRUE, check the marked rows, and delete those visible data rows.
Does Excel have a built-in command to delete every nth row?
There is no standard one-click worksheet command specifically for deleting every nth data row. A helper column with a filter is a practical built-in approach, while a FILTER formula can create a separate result in supported versions.
Can I delete every nth row without deleting the header?
Yes. Begin the count at the first record below the header, and select only the filtered data rows for deletion. Do not include the heading row in the selection.
Can I use this for every x columns instead?
No. The method here counts records down rows. To remove every nth column, you need to mark or select columns across the sheet; applying a row-count formula will not identify columns.
Can I undo deleting the rows?
Usually, Ctrl+Z on Windows or Command+Z on Mac reverses a recent deletion if the workbook is still open and the undo history is available. Save a backup before a large change rather than relying on undo, especially if you perform other actions afterward.
Check the result before sharing
After deletion, confirm the remaining record count and inspect the records immediately before and after each removed position. For example, when removing every fourth record, verify that records 4, 8, and 12 are gone while records 3, 5, 7, and 9 remain. Clear filters, remove temporary helper data, and check formulas or summaries that rely on the affected range. This final review catches an off-by-one count or a mistaken selection before the workbook is used elsewhere.
Related
- Copy an Entire Excel Spreadsheet to a New File
- Copy and Paste X Times in Excel: Repeat Cells or Rows
- Convert H:M:S to a Number in Excel
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Conditional Formatting Formula If Statement in ExcelIn Excel, a conditional-formatting formula must evaluate to TRUE or FALSE for the cell or row you want…
- Median Formula Examples in Excel and by HandThe median is the middle value after a set of numbers is arranged from smallest to largest; with…
- Excel UPPER Function: How to Make Text All CapsExcel’s uppercase text function is UPPER. In Microsoft Excel for Microsoft 365, enter =UPPER(A2) to convert the text…
- COUNTIF in Excel: Count Cells That Contain NumbersYes—COUNTIF can count cells that meet a numeric condition, and it can find text containing a particular digit.…
- Excel NPV of a Series of Cash Flows: Formula and ExamplesTo calculate the net present value of a cash-flow series in Excel, use =NPV(B1,B3:B5)+B2 when the discount rate…
- Excel IFERROR vs ISERROR: Which Should You Use?Use IFERROR when you want to replace an error with a value such as a message or blank-looking…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.