Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try the macro below.
Replace 99 with the last row you want to leave (has to be multiple of 3) Sub DelRow() Application.ScreenUpdating = False For i = 99 To 3 Step -3 Range("A" & i & ":A" & i + 1).Select Selection.EntireRow.Delete Next i Application.ScreenUpdating = True End Sub "bioyyy" wrote: Hello: I need a macro to delete every other rows starting from row2. For example Col B Row2: Test1-a Row3 Test1-b Row4 Test1-c Row5: Test2-a Row6: Test2-b Row7: Test2-c In other words, I'd like the macro to delete row 3-4 (b-c) and 6-7 (b-c), and so on Thanks again, |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sheeloo. Thanks for a big help again.
"Sheeloo" wrote: Try the macro below. Replace 99 with the last row you want to leave (has to be multiple of 3) Sub DelRow() Application.ScreenUpdating = False For i = 99 To 3 Step -3 Range("A" & i & ":A" & i + 1).Select Selection.EntireRow.Delete Next i Application.ScreenUpdating = True End Sub "bioyyy" wrote: Hello: I need a macro to delete every other rows starting from row2. For example Col B Row2: Test1-a Row3 Test1-b Row4 Test1-c Row5: Test2-a Row6: Test2-b Row7: Test2-c In other words, I'd like the macro to delete row 3-4 (b-c) and 6-7 (b-c), and so on Thanks again, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete row | Excel Worksheet Functions | |||
delete a macro that isn't in macro list | Excel Discussion (Misc queries) | |||
How can I delete a macro when the Delete button is not active? | Excel Worksheet Functions | |||
How do i delete a macro in Excel 2003 when delete isn't highlight | Excel Discussion (Misc queries) | |||
Macro to delete a row | Excel Discussion (Misc queries) |