B
briskbaby
Hi guys, I'm trying to create a loop that will delete the next row until
it hits a blank. Only problem is I do not know how to offset to the next
row and than select that entire row to delete. Thanks in advance.
Sub Macro2()
Sheets("test").Select
Sheets("test").Copy Before:=Sheets(1)
Rows("1:6").Select
Range("B6").Activate
Selection.Delete Shift:=xlUp
Cells.Select
With Selection
..Orientation = 0
..AddIndent = False
..ShrinkToFit = False
..MergeCells = False
End With
Rows("4:4").Select
Selection.Delete Shift:=xlUp
Do
Rows("5:5").Select
Selection.Delete Shift:=xlUp
Rows("6:6").Select
Selection.Delete Shift:=xlUp
Rows("7:7").Select
Selection.Delete Shift:=xlUp
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
End Sub
it hits a blank. Only problem is I do not know how to offset to the next
row and than select that entire row to delete. Thanks in advance.
Sub Macro2()
Sheets("test").Select
Sheets("test").Copy Before:=Sheets(1)
Rows("1:6").Select
Range("B6").Activate
Selection.Delete Shift:=xlUp
Cells.Select
With Selection
..Orientation = 0
..AddIndent = False
..ShrinkToFit = False
..MergeCells = False
End With
Rows("4:4").Select
Selection.Delete Shift:=xlUp
Do
Rows("5:5").Select
Selection.Delete Shift:=xlUp
Rows("6:6").Select
Selection.Delete Shift:=xlUp
Rows("7:7").Select
Selection.Delete Shift:=xlUp
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
End Sub