shyampanda,
Welcome to the forum. In the future, please wrap your code in code tags. As for your question, the following should work for you:
Sub DeleteBlankRowsMacro_for_shyampanda()
Dim RowIndex As Long
Dim rngRows As Range
With ActiveSheet
For RowIndex = .UsedRange.Row + .UsedRange.Rows.Count - 1 To 1 Step -1
If WorksheetFunction.CountA(.Cells(RowIndex, 1).Resize(1, .Columns.Count)) = 0 Then
If rngRows Is Nothing Then
Set rngRows = .Cells(RowIndex, 1)
Else
Set rngRows = Union(rngRows, .Cells(RowIndex, 1))
End If
End If
Next RowIndex
End With
If Not rngRows Is Nothing Then rngRows.EntireRow.Delete xlShiftUp
End Sub
Hope that helps,
~tigeravatar
Bookmarks