Regards,
Kevin
~~~~~~~~~~~~~~~~
This deletes any row that has a blank cell in column A. This should work
for you if that condition means the row is blank. Blank, of course, means
the cell is empty. With a text file, there could be spaces in the cell and
they only look blank.
Sub DeleteRows()
Set rng = Range(Cells(1, "A"), Cells(Rows.Count, "A").End(xlUp))
Set rng = rng.SpecialCells(xlBlanks)
rng.EntireRow.Delete
ActiveWorkbook.Close SaveChanges:=True
End Sub
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.