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

Full-Screen Mode in Word 2007

Full-screen mode in Word 2007 doesn't work exactly the same as it did in earlier versions of Word. Don't fret; the ...

Discover More

Starting a New Section on an Odd Page Number

A common pagination convention used in publishing is for new chapters (and sometimes new sections) to start on an ...

Discover More

Insert a TOC without Upsetting Pagination

Insert a table of contents in your document, and your page numbering may get thrown for a loop. If you want the page ...

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

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 2 + 1?

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.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

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.