Excel.Tips.Net: Deleting Every X Rows without a Macro

By Allen Wyatt for Excel.Tips.Net

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.)

Article Continued Here

This post is excerpted with permission from Excel.Tips.Net

Subscribe to the Free ExcelTips Newsletter with the links below

(for those using Excel 97 through 2003)

(for those using Excel 2007 through 2010)

(Visited 225 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *