このコードをシートモジュール(右マウスでシートタブをクリックして「コードを表示」を選択)に入れることができます:
Sub Delete_Blank_Rows()
'Deletes the entire row within the selection if the ENTIRE row contains no data.
'We use Long in case they have over 32,767 rows selected.
Dim i As Long
Dim LastRow As Integer
'We turn off calculation and screenupdating to speed up the macro.
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
'Reduce the work on the calc and define the range
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("A2:A" & LastRow).Select
'We work backwards because we are deleting rows.
For i = Selection.Rows.Count To 1 Step -1
If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Selection.Rows(i).EntireRow.Delete
End If
Next i
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
``` &001