Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to delete every other row in a 2000 row Excel 2007 spreadsheet. Could
someone help me with the code with this. I am ok with Word VBA but NOT Excel. Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub deleteAlternatingRows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -2 Rows(i).Delete Next i End Sub -- Please remember to indicate when the post is answered so others can benefit from it later. "Legal Learning" wrote: I need to delete every other row in a 2000 row Excel 2007 spreadsheet. Could someone help me with the code with this. I am ok with Word VBA but NOT Excel. Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is REALLY easy w/o VBA...
Use a helper (blank) column, insert a column if you'd like At the start of your data (assuming you are not skipping blank rows, if so, this isn't for you) put this formula =MOD(ROW(),2) Copy down your entire data set Filter on that column (Home tab | Editing group | Sort & Filter button) for whichever odd/even row you want to delete (0 or 1) Select the visible rows Hit Ctrl + - (that is a minus sign) Confirm delete entire row Delete helper column HTH -- Zack Barresse "Legal Learning" wrote in message ... I need to delete every other row in a 2000 row Excel 2007 spreadsheet. Could someone help me with the code with this. I am ok with Word VBA but NOT Excel. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
emailing part of spreadsheet using Excel 2007 and Outlook 2007 | Excel Discussion (Misc queries) | |||
hyperlink in Excel 2007 spreadsheet cell, to a Powerpoint 2007 sli | Excel Discussion (Misc queries) | |||
delete spreadsheet | Excel Programming | |||
delete all the spreadsheet | Excel Discussion (Misc queries) | |||
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? | Excel Discussion (Misc queries) |