![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 1
|
If you have a full spreadsheet with all rows occupied (65,536 rows) is there any quick way of deleting every second row.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
Hit Alt+F11 to access VBA code. Then choose Insert: Module.
Type this code Sub RemoveEvens() Range("A65536").Select Do While Not IsEmpty(ActiveCell) ActiveCell.EntireRow.delete ActiveCell.Offset(-2,0).Select Loop End Sub This will start with the last row and delete every other row assuming there are no blank cells in Column A. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|