The below code lets you find the last row and look into the range of cell if it is blanks.
However there are instance where the lastrow might be error prone as this doesn’t tell you FOR SURE the last used row in the entire sheet, unless you can be certain that Column A holds the data.
Dim Lastrow As Integer
Lastrow = Range("A" & Rows.Count).End(xlUp).Row
Range("B2:B" & Lastrow).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Referenced from mrexcel