如题所述
Sub dd()
Dim ss As Range
Set ss = ActiveSheet.Cells.Find(What:="要找的字符串", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False)
If ss Is Nothing Then
MsgBox "未找到"
Else
ss.Activate
MsgBox ss.Value
End If
End Sub
Dim ss As Range
Set ss = ActiveSheet.Cells.Find(What:="要找的字符串", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False)
If ss Is Nothing Then
MsgBox "未找到"
Else
ss.Activate
MsgBox ss.Value
End If
End Sub
温馨提示:答案为网友推荐,仅供参考