Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Deleting Every X Rows without a Macro.

Deleting Every X Rows without a Macro

by Allen Wyatt
(last updated January 17, 2015)

6

When working with data retrieved from another source—such as another user or from an external program—you may have a need to remove certain rows from the data. It is not unusual, for instance, to have the need to remove every third row or every fifth row. The following general steps allow you to delete every X rows without using a macro.

  1. Insert two columns (A and B) on the far left side of the worksheet.
  2. In the new column A, use AutoFill to sequentially number the rows from 1 to the end.
  3. In cell B1 (assuming you have no header row), enter the formula =MOD(A1,3). (This formula assumes that you want to delete every third row. If you want to delete some other multiple of rows, substitute that number in place of the 3 in the formula.)
  4. Copy the formula downward to all the other cells in the B column.
  5. Display the Data tab of the ribbon.
  6. Click the Filter tool, in the Sort & Filter group. Excel displays small drop-down arrows beside the header row cells.
  7. Using the drop-down list in column B, select the 0. Now, only those rows with a zero in column B appear.
  8. Select all the displayed rows and delete them.
  9. Turn off AutoFilter. (Repeat steps 5 and 6 to do this.)
  10. Delete columns A and B.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6123) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Deleting Every X Rows without a Macro.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing a Draft Watermark

Adding a watermark to the background of a printout can be challenging. This tip explains the different ways you can implement ...

Discover More

Scanning and Fixing System Files

Is your system running a bit flakey at times? If you think the culprit might be a problem with some of your system files, ...

Discover More

Creating and Saving a Spreadsheet

Before you can work with numbers, dates, and formulas, you need to create your Sheets spreadsheet. You can do so using the ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

MORE EXCELTIPS (RIBBON)

Inserting Rows

Need to insert rows in your worksheet? Excel provides a few techniques you can use to do this. Here are some ideas you can ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 6?

2017-03-03 13:10:43

Michael (Micky) Avidan

@Bernie In Berkeley,
You don't need to delete rows in order to build a list of dates EXCLUDING Sundays.
Try to adopt the formula solution - shown in the linked picture.
https://s7.postimg.org/5i91ke4wr/NONAME.png
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2017)
ISRAEL


2017-03-02 10:19:01

Samli

Thank you!!


2017-01-06 22:27:17

Bernie In Berkeley

GREAT tip. I used it to make a 6-day week dated calendar (deleting Sunday rows). Thank you!


2016-05-11 06:55:37

Andes

THANK YOU!!!


2015-11-04 16:12:06

Mr. TEch

Thank you Burros Machos!!!


2015-03-05 16:16:55

Kate

Thank you. Thank you. This is making the horrendous task of doing my small business taxes somewhat less painful.


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share