|
已修改- Sub searchFile()
- Dim mySearch As String, x As Integer, y As Integer
- Range("A4:A100").ClearContents
- mySearch = Cells(2, 1)
- If mySearch = "" Then MsgBox "请输入要查找的内容": Exit Sub
- For x = 2 To Sheet2.Cells(Rows.Count, 2).End(xlUp).Row
- If InStr(Sheet2.Cells(x, 3), mySearch) Then
- y = y + 1
- Sheet1.Cells(y + 3, 1) = Sheet2.Cells(x, 3) & "|" & x
- Sheet1.Cells(y + 3, 1).Select
- With Selection
- .Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="常用命令汇总!" & "C" & x
- .Font.Name = "宋体"
- .Font.Size = 11
- .HorizontalAlignment = xlHAlignCenter
- .VerticalAlignment = xlVAlignCenter
- End With
- End If
- Next
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|