only deletes first row with a blank cell in column "M"

G

Guest

This code works but it only deletes the first row where the "M" column field
is missing. There are quite a few rows without that data I want deleted.
How come it only deletes the first one? It looks like it should work on the
whole range. Do I need to put in a loop or do I need to give it a range?

thanks

------------code------------
Sub DeleteBlanks()
With ActiveSheet
On Error Resume Next
.Columns("M").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top