Sometimes you need to remove rows following a repeating pattern. For example, keeping two rows, deleting the next three, and repeating that sequence throughout a worksheet. While Excel doesn’t have a built-in command for this, it’s easy to accomplish using a helper column, sorting, or filtering.

In this tutorial, you’ll learn how to create a repeating keep/delete pattern using Excel’s AutoFill feature, then use sorting or filtering to quickly remove the unwanted rows. This approach works well for large datasets and can easily be adapted to different row patterns.

Inspired by a Real Question

This tutorial was created in response to a question posted in the Microsoft Tech Community. It’s a good example of how a few simple Excel features can solve a repetitive data-cleaning task without requiring formulas or VBA.


What You’ll Learn

  • Create a repeating pattern using a helper column.
  • Use AutoFill to extend the pattern across your data.
  • Sort or filter rows based on the helper column.
  • Delete repeating groups of rows efficiently.
  • Adapt the technique for any repeating keep/remove pattern.

Practice & Resources

Want to work through the examples yourself? This tutorial includes a practice workbook you can use while following along with the video and step-by-step instructions.

Click the button below to view the resources available for this tutorial.


Common Uses

This technique is useful whenever you need to remove repeating groups of data, including:

  • Cleaning exported reports
  • Removing spacer rows
  • Keeping every nth record
  • Preparing data for analysis
  • Cleaning machine-generated datasets
  • Formatting imported data before processing

Requirements & Compatibility

Requirements

This tutorial uses standard Excel features:

  • AutoFill
  • Sort
  • Filter

Compatibility

These features are available in Microsoft 365, Excel 2021, Excel 2019, and many earlier desktop versions of Excel.


Video Tutorial


Breaking Down the Technique

Unlike many Excel tutorials, this solution doesn’t require a formula.

Instead, it uses three simple features working together:

Helper Column

Create a new column that identifies each row as either:

  • Keep
  • Delete

AutoFill

Enter the first repeating pattern, for example:

Keep
Keep
Delete
Delete
Delete

Then drag the fill handle downward to repeat the pattern automatically.

Sort or Filter

Once the helper column is complete, you can either:

  • Filter to show only the rows marked Delete, then delete them.

or

  • Sort by the helper column so all Delete rows are grouped together before deleting them.

Step-by-Step Instructions

  1. Insert a new helper column next to your data.
  2. Enter your desired repeating pattern (for example: Keep, Keep, Delete, Delete, Delete).
  3. Highlight the completed pattern.
  4. Drag the fill handle downward to repeat the sequence throughout your dataset.
  5. Apply a Filter or Sort using the helper column.
  6. Display or group the rows marked Delete.
  7. Delete those rows.
  8. Remove the helper column if it is no longer needed.

Additional Tips

Helpful Tip

Always make a backup copy of your worksheet before deleting large numbers of rows.

Version Compatibility

Because this technique relies only on AutoFill, sorting, and filtering, it works in virtually every modern version of Microsoft Excel.


Related

How to Remove Extra Spaces in Excel

Learn how to remove extra spaces from text in Microsoft Excel using the TRIM function. This beginner-friendly tutorial explains what TRIM removes, when to use it, and why it’s one of the most useful functions for cleaning imported or inconsistent data.

How to Hide Zero Values (0s) in Excel

Learn two easy ways to hide zero values in Microsoft Excel without changing your formulas. This step-by-step tutorial demonstrates both the built-in worksheet option and a Conditional Formatting method to create cleaner spreadsheets, reports, and templates. Includes updated instructions and screenshots for current versions of Excel.

How to Create an Order Form with Drop-Down Menus in Microsoft Excel

Learn how to create a professional order form in Microsoft Excel using drop-down menus, Data Validation, and named ranges. This step-by-step tutorial also covers formatting dates, ZIP codes, and credit card fields to build cleaner, more accurate spreadsheets for real-world business use.


Stay Updated

There are two easy ways to get notified when new tutorials are published:

Subscribe on YouTube for new video tutorials: @SimpleSoftwareTutorials

or enter your email below to receive new blog posts directly in your inbox: