' Function to erase empty rows in excel
' !!Currently it checks second work sheet!!
' Checks the first cell and erases the entire row if the cell is empty
'Simply copy this macro to your excel file

Sub EraseEmptyRows()

Dim MyCheck, rw, this, i
For i = 1 To 50
' Scan through rows 1 to 50
For Each rw In Worksheets(2).Cells(i, 1).CurrentRegion.Rows
' Select each row starting from 1 on page 2
     this = rw.Cells(1, 1).Value
' Copy the value of A cell
     MyCheck = IsEmpty(this)
' Check if the cell is empty
     If MyCheck Then rw.Delete
' If it is, erase entire row
Next rw
' End for loop for rw
Next i
' End for loop for i

End Sub