JoeyMang83
New Member
- Joined
- Dec 17, 2011
- Messages
- 19
Hello,
I am having trouble finding (or creating working) code to work within an existing sub routine.
I simply need to delete blank rows within this range (B300:B1000), but neither of the code snippets below work? Can you help? Thank you.
THANK YOU SO MUCH!!!
I am having trouble finding (or creating working) code to work within an existing sub routine.
I simply need to delete blank rows within this range (B300:B1000), but neither of the code snippets below work? Can you help? Thank you.
Code:
Range("B300:B1000").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Code:
Dim LastRow As Integer
Dim i As Integer
LastRow = ActiveSheet.Range("B1000").End(xlUp).Row
For i = LastRow To 300 Step -1
If ActiveSheet.Cells(i, 2).Value = "" Then
ActiveSheet.Cells(i, 2).EntireRow.Delete
End If
Next i
THANK YOU SO MUCH!!!