Sub removeprocessed()
Dim Nlines As Long
Dim i As Long
Nlines = Columns(1).Find("*", , , , xlByColumns, xlPrevious).Row
For i = 2 To Nlines
If 0 <> InStr(1, Cells(i, 3).Value, "processed") Then
Cells(i, 1).Value = ""
End If
If 0 <> InStr(1, Cells(i, 3).Value, "blue") Then
Cells(i, 2).Value = 0
End If
Next
End Sub
2 回答
使用
InStr
-Function检查它是否包含子字符串 . 如需更多信息,请查看here .使用@UGP提出的InStr