Deleting alternative rows
I have region containing roughly 100 rows. I would like to create a macro
that deletes every other row within the region. I would like to start by deleting row 2 & then continue to do so for the rest of the region. Please advise. Thanks |
Deleting alternative rows
try this
Sub deleteeveryotherrow() For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -2 Rows(i).Delete Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Curt J" <Curt wrote in message ... I have region containing roughly 100 rows. I would like to create a macro that deletes every other row within the region. I would like to start by deleting row 2 & then continue to do so for the rest of the region. Please advise. Thanks |
Deleting alternative rows
Perfect, thanks for the help Don.
"Curt J" wrote: I have region containing roughly 100 rows. I would like to create a macro that deletes every other row within the region. I would like to start by deleting row 2 & then continue to do so for the rest of the region. Please advise. Thanks |
Deleting alternative rows
Glad to help
-- Don Guillett Microsoft MVP Excel SalesAid Software "Curt J" wrote in message ... Perfect, thanks for the help Don. "Curt J" wrote: I have region containing roughly 100 rows. I would like to create a macro that deletes every other row within the region. I would like to start by deleting row 2 & then continue to do so for the rest of the region. Please advise. Thanks |
All times are GMT +1. The time now is 10:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com