Need a Macro that will delete every odd row starting at row number 1.
Sub Test()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
If Int(iLastRow / 2) * 2 = iLastRow Then iLastRow = iLastRow - 1
For i = iLastRow To 1 Step -1
Rows(i).Delete
Next i
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Brandon Horne" wrote in message
. ..
I have looked online and only found a macro that would delete every even
row.
I have a recurring job that requires me to delete every odd row. Could
someone please help me with this.
Thanks,
Brandon
|