回答:
これは簡単な手動の方法です
Auto Filter
シートに適用するC
ブランクでフィルターこのプロセスは、必要に応じてVBAで自動化できます。マクロレコーダーを実行して開始してみてください
他のセルに他の数式の束がないと仮定した最も簡単なことは、列Cですべてを並べ替えてから、列Cに空白があるすべての行を削除することです(ソート関数は空白の値を入れますファイルの上部の列Cの場合)。
要約すれば:
これは動作するはずです。
Columns("C:C").Select
Set rngRange = Selection.CurrentRegion
lngNumRows = rngRange.Rows.Count
lngFirstRow = rngRange.Row
lngLastRow = lngFirstRow + lngNumRows - 1
lngCompareColumn = ActiveCell.Column
For lngCurrentRow = lngLastRow To lngFirstRow Step -1
If (Cells(lngCurrentRow, lngCompareColumn).Text = "") Then _
Rows(lngCurrentRow).Delete
Next lngCurrentRow
このコードをシートモジュールに配置できます(マウスの右ボタンで[シート]タブをクリックし、[コードの表示]を選択します)。
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