How to Delete Repeating Groups of Rows in Excel
Question details
The user needs a method to efficiently delete specific, repeating blocks of rows without affecting the remaining data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Cleaning up a spreadsheet that contains regularly repeating blocks of unnecessary data, such as removing 3 rows and keeping 1 continuously.
- Observed behavior
- Manual deletion of large datasets with repeating row patterns is time-consuming and prone to accidental deletion of the wrong records.
Before deleting multiple rows, it is highly recommended to save a backup copy of your worksheet to ensure you can easily restore your original data if the wrong rows are accidentally removed.
Use a Helper Column and Filter to Delete Repeating Rows
This method uses the MOD and ROW functions to identify a mathematical pattern for your row blocks, making it highly efficient and safe for large datasets.
By using a formula to flag the exact rows that need deletion, you minimize the risk of human error when scrolling through thousands of entries.
Create a new column next to your data. Enter the formula =MOD(ROW()-2,4)<3 in the first relevant row. Adjust the numbers based on your specific repeating pattern.
Drag the fill handle down to apply this formula to all rows in your dataset. It will return TRUE for the rows to be deleted and FALSE for the rows to keep.
Go to the Data tab, click Filter, and use the dropdown arrow on your helper column to show only TRUE values.
Select all the filtered rows, right-click the row headers on the far left, and choose Delete Row.
Turn off the filter from the Data tab and delete the helper column to leave only your clean data.

Delete Row Blocks Manually Using the Ctrl Key
If you only have a few repeating groups of rows to remove, manually selecting them is a quick one-time fix without needing formulas.
Easily Manage and Delete Rows in WPS Spreadsheet
WPS Office provides a seamless and highly compatible spreadsheet tool that makes organizing data, applying formulas, and filtering out repeating rows incredibly fast and easy.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the repeating rows.
- 2. Apply the MOD formula: Create a helper column and enter your MOD pattern formula just as you would in Excel.
- 3. Use the AutoFilter tool: Navigate to the Data tab, click AutoFilter, and filter the helper column to display only the TRUE results.
- 4. Delete and clean up: Highlight the filtered row headers, right-click to delete them, and then clear the filter to view your cleaned dataset.

Frequently Asked Questions
How do I adjust the MOD formula for a different repeating row pattern?
The formula =MOD(ROW()-StartRow, TotalCycle)<RowsToDelete relies on three factors. 'StartRow' is the first row of your data, 'TotalCycle' is the total number of rows before the pattern repeats entirely, and 'RowsToDelete' is how many consecutive rows in that cycle you want to remove. Adjust these numbers to fit your specific dataset.
Is there a way to delete every alternating row in Excel?
Yes, you can use a simpler helper column formula like =ISODD(ROW()) or =ISEVEN(ROW()) depending on which rows you want to delete. Filter for TRUE and delete the visible rows.
Will deleting rows using a filter mess up my formulas?
If your formulas refer to specific cells within the deleted rows, they will return a #REF! error. To prevent this, copy your formula results and paste them as values (Paste Special > Values) before deleting any rows.
Can I use a macro to delete repeating groups of rows?
Absolutely. For recurring tasks, you can write a VBA macro with a For Loop stepping backwards (e.g., Step -4) to automatically select and delete the required row ranges without manual filtering.




