|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub 查找()
- Dim theStr$, theCell As Range
- theStr = Sheet2.Cells(1, 2)
- If Len(theStr) = 0 Then Exit Sub
- With Sheet1.Rows(6).Cells
- Set theCell = .Find(What:=theStr, After:=.Cells(.Count), LookIn:=xlValues, LookAt:= _
- xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True _
- , MatchByte:=True, SearchFormat:=False)
- If Not theCell Is Nothing Then
- MsgBox prompt:="出现过"
- Exit Sub
- Else
- MsgBox prompt:="现在执行下一步了!"
- End If
- End With
- Set theCell = Nothing
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|