gjtaylor10
New Member
- Joined
- Aug 18, 2010
- Messages
- 3
I have over 40,000 rows of information that i need to be trimmed down. Is there a easy way to delete every OTHER row of information? I need help fast.
Sub DeleteRows()
StartRow = 1 '<-- Enter First Row To Be Deleted
EndRow = 100 '<-- Enter Last Row To Be Deleted
currR = StartR - 2
Do
currR = currR + 2
Rows(currR).Delete Shift:=xlUp
Loop Until currR > EndR - 2
End Sub
Sub Delete_Everey_Other_Row()
Dim Lastrow As Long, r As Long
Lastrow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Application.ScreenUpdating = False
For r = Lastrow To 1 Step -2
Rows(r).Delete
Next r
Application.ScreenUpdating = False
End Sub
Im unaware on how to work with Macros. I have windows 7 with excel 2007. How do i run the macro or enter the code.