Delete rows
Your "modified code" will look like this:
Private Sub DeleteBlankRows()
Dim lastrow As Long
Dim r As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
For r = lastrow To 2 Step -1
If Application.CountIf(Cells(r, "A").Resize(1, 1), "") = 1 Then
ActiveSheet.Rows(r).Delete
End If
Next
End Sub
:)
"One-Leg" wrote in message
...
Hello,
From cell A1 to A3500, I have many cells with infos in it and many cells
with no info at all. How can I create a macro that will delete the entire
row in which colomn A has no info???
In example:
A1: Test 1
A2:
A3:
A4:
A5: Test 2
A6:
A7: Test 3
A8:
I would like to create a macro that will automatically delete rows
2-3-4-6-8
and leave intact rows 1-5-7.
Thanks!!!
|