Sub 删除E列包含@的行()
Dim EndH, i As Long
EndH = Range("e65536").End(xlUp).Row
For i = EndH To 1 Step -1
XX = Range("E" & i).Value
If InStr(XX, "@") <> 0 Then '@就是要找到指定的特定字符 可以改成你指定的其他字符
Range("E" & i).EntireRow.Delete 'E列是指定要查找的列.狂野改成你指定的其他列
End If
Next
MsgBox "已删除E列包含@ 的行!"
End Sub
Sub Macro1()
A = InputBox("请输入需要删除包含的某特定字符", "输入框", v)
j = Trim(InputBox("请输入需要选择的列号", "输入框", 1))
For k = j To j
For i = 1 To 65535
Sheets(1).Cells(i, k).Select
If Len(Sheets(1).Cells(i, k).Value) = 0 Then
Exit For
End If
If InStr(Sheets(1).Cells(i, k).Value, A) <> 0 Then
B = i & ":" & i
Sheets(1).Rows(B).Select
Selection.Delete Shift:=xlUp
End If
Next i
Next k
Sheets(1).Cells(i, k).Select
MsgBox "删除操作完成!"
End Sub
点你想删的那一行鼠标右键就可以看到删除