Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
その行の 2 つの列の値が数値より小さいかどうかをチェックする For ループを使用して行全体を削除するにはどうすればよいでしょうか。これは私が以下に持っているものです。
For Each row In Sheet4.Range("A6:AJ500").Cells If Columns("G").value < 500 And Columns("J").value < 50 _ Then row.EntireRow.Delete Next
逆方向にループする必要があります。
Sub foo() For i = 500 To 6 Step -1 If Cells(i, "G") < 500 and Cells(i, "J") < 50 Then Rows(i).Delete End If Next i End Sub