L leonardtan Member Feb 13, 2017 #1 Would like to remove blank rows using vba. Have highlighted the rows in yellow. Could you assist. Attachments problem1.xlsx 21 KB · Views: 10
N Nebu Excel Ninja Feb 13, 2017 #2 Hi: Use the following code: Code: Sub test() j& = Me.Cells(Rows.Count, 2).End(xlUp).Row For i& = j To 4 Step -1 If Cells(i, 2) = vbNullString Then Rows(i).EntireRow.Delete Next End Sub Thanks
Hi: Use the following code: Code: Sub test() j& = Me.Cells(Rows.Count, 2).End(xlUp).Row For i& = j To 4 Step -1 If Cells(i, 2) = vbNullString Then Rows(i).EntireRow.Delete Next End Sub Thanks
J jindon Well-Known Member Feb 13, 2017 #3 No loop Code: Sub test() With Range("b3", Range("b" & Rows.Count).End(xlUp)) .AutoFilter 1, "" .Offset(1).EntireRow.Delete .AutoFilter End With End Sub
No loop Code: Sub test() With Range("b3", Range("b" & Rows.Count).End(xlUp)) .AutoFilter 1, "" .Offset(1).EntireRow.Delete .AutoFilter End With End Sub