Forum Discussion
rleveck
Aug 28, 2025Copper Contributor
how to delete every other line in excel work sheet
how do i delete every other line in a worksheet?
NikolinoDE
Sep 01, 2025Gold Contributor
In addition to the suggested options with formulas, here is an inserted file with VBA where you select all the lines you want to keep and the macro does the rest (deletes).
The VBA code in the attached Workbook works in all modern versions of Excel that support macros, Excel 2016, Excel 2019, Excel 2021, Excel 365 / Microsoft 365.
It will not work in Excel for the web, because the online version doesn’t support running VBA macros. It also works in both Windows and Mac versions of desktop Excel, though on Mac the interface for running macros is slightly different.
The only requirements: Macros must be enabled in your Excel workbook.
A user-friendly macro where you can select the rows to keep via a dialog🙂
- ElisaDelaneySep 05, 2025Copper Contributor
This was a lifesaver!