Cells.Find(What:=Cells(1, 1), After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False).Activate
Cells(1, 1)代表单元格A1,你可以替换成必要指定的单元格。
InStr(单元格,指定字符) =0找不到,反之找得到
查找所有应用区域中包含“Hello”字符串的
Sub test1()
Dim v As String
Dim r As Range
v = "Hello"
For Each r In ActiveSheet.UsedRange
If InStr(1, r, v) <> 0 Then
MsgBox r.Address
End If
Next
End Sub