Dim rg As Range
endrow = Range("A65536").End(xlUp).Row
For Each rg In Range("A1:A" &endrow)
If rg = "指定内容" Then
rg.EntireRow.Delete
End If
Next
End Sub
大概是这个意思么?
Sub 清除()For k = 1000 To 60 Step -1
If (Cells(k, 1) = -5 And Cells(k, 2) = 80) Or (Cells(k, 1) = 25 And Cells(k, 2) = 64) Then
Cells(k, 1).EntireRow.ClearContents
End If
Next
End Sub
功能区域为第60-1000行。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)