Which row do you want to delete ??
Sub delrows()
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction
For I = 104 To 5 Step -1
If wf.CountBlank(Range("A" & I & ":" & "R" & I)) = Range("A" & I & ":" & "R" & I).Count Then
Rows(I).EntireRow.Delete
End If
Next I
End Sub
Something likeCode:Sub delrows() Dim wf As WorksheetFunction Set wf = Application.WorksheetFunction For I = 104 To 5 Step -1 If wf.CountBlank(Range("A" & I & ":" & "R" & I)) = Range("A" & I & ":" & "R" & I).Count Then Rows(I).EntireRow.Delete End If Next I End Sub
A to I you said, i accidentally used A to R,but in any case it works for me. Please try the modified version belowThis doesn't seem to do anything on my worksheet.
Sub delrows()
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction
For I = 104 To 5 Step -1
If wf.CountBlank(Range("A" & I & ":" & "I" & I)) = Range("A" & I & ":" & "I" & I).Count Then
Rows(I).EntireRow.Delete
End If
Next I
End Sub
A to I you said, i accidentally used A to R,but in any case it works for me. Please try the modified version below
Code:Sub delrows() Dim wf As WorksheetFunction Set wf = Application.WorksheetFunction For I = 104 To 5 Step -1 If wf.CountBlank(Range("A" & I & ":" & "I" & I)) = Range("A" & I & ":" & "I" & I).Count Then Rows(I).EntireRow.Delete End If Next I End Sub
Sub del_r()
Dim i As Long
For i = 104 To 5 Step -1
If Application.CountA(Range("A" & i & ":" & "I" & i)) = 0 Then Rows(i).Delete
Next i
End Sub
Sub del_r2()
Range("A5:I104").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub