selectively deleting cells

D

Del

I would like to selectively delete alternate rows on an excel worksheet containing a long list of data. i.e. deleting rows/cells A3,A5,A7,A9,A11....A30573 etc. How do i do this quickly without having to use CTRL + select for each specific cell/row?
 
C

Chip Pearson

Del,

It isn't clear what you mean by "selectively" delete the rows. If
you just want to delete every other row, use code like

Sub DeleteEveryOtherRow()
Dim RowNdx As Long
Application.ScreenUpdating = False
For RowNdx = 30573 To 3 Step -2
Rows(RowNdx).Delete
Next RowNdx
Application.ScreenUpdating = True
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



Del said:
I would like to selectively delete alternate rows on an excel
worksheet containing a long list of data. i.e. deleting
rows/cells A3,A5,A7,A9,A11....A30573 etc. How do i do this
quickly without having to use CTRL + select for each specific
cell/row?
 
Top