我给你写了下面的代码,你试试看:
Option Explicit
Sub 删除指定内容行()
Dim arr, i
If Cells(1, 1) = "" Then Cells(1, 1) = " "
arr = ActiveSheet.UsedRange
For i = UBound(arr) To 3 Step -1
If InStr(arr(i, 1), "性别") + InStr(arr(i, 1), "年龄") + InStr(arr(i, 1), "身高") > 0 Then Rows(i).Delete
Next i
End Sub
with行放do上面
end with放loop下面