|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
代码如下
Private Sub CommandButton1_Click()
Dim ar, br(1 To 60000, 1 To 23), i, n, c
c = IIf(Right(Me.TextBox1, 1) Like "[0-9]", 4, IIf(Right(Me.TextBox1, 1) Like "[a-zA-Z]", 8, 5))
Debug.Print c
ar = Sheets(2).Range("a2:z" & Sheets(2).[a65536].End(3).Row)
For i = 1 To UBound(ar)
If InStr(ar(i, c), UCase(Me.TextBox1)) > 0 Then
n = n + 1
For j = 1 To 23
br(n, j) = ar(i, j)
Next j
End If
Next
Rows("14:" & ActiveSheet.UsedRange.Rows.Count + 100) = ""
If n = 0 Then MsgBox "无此数据": Exit Sub
[a14].Resize(n, 23) = br
End Sub
现需要UU列返回数据保留原有超链接不知道该怎么处理了 请各位大神帮帮忙
|
|