Deleting Empty Rows in Microsoft Excel

Enter the following code into VBA.

Sub DeleteEmptyRows()
Dim S As Long
For S = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(S)) = 0 Then
Selection.Rows(S).EntireRow.Delete
End If
Next S
End Sub

On your spreadsheet select the range of cells that you want Excel to perform the operation on.
Then run the macro.