PDA

View Full Version : Deleting ony those rows in excell sheet in which entire row cell is blank .



aligahk06
05-08-2015, 07:49 PM
Dear All,
Deleting ony those rows in excell sheet in which entire row cell is blank .
Any Help

vcoolio
05-10-2015, 02:50 AM
Hello Aligahk06,

Based on your rather short explanation, I assume that you have a number of blank rows that you would like to be deleted. If so, the following code may do the task for you:-



Sub ClearBlanks()
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
With Range("A2", Range("A" & Rows.Count).End(xlUp))
.AutoFilter 1, ""
On Error Resume Next
.Offset(1).SpecialCells(4).EntireRow.Delete
End With
.AutoFilterMode = False
End With
Application.ScreenUpdating = True
End Sub



I hope that this helps you.

Attached is a sample work book.

Cheerio,
vcoolio.