|
本帖最后由 joyark 于 2011-10-15 12:46 编辑
模糊查询文件連照片
Private Sub Worksheet_Change(ByVal Target As Range)
'On Error GoTo xxx
t = Target.Address
If t <> "$B$1" And t <> "$B$2" Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
Range("a5:e65536").Clear
For Each s In ActiveSheet.Shapes
s.Delete
Next
x = 5
With Sheets("源数据")
c = "*" & Range("b1") & "*"
n = "*" & Range("b2") & "*"
For r = 2 To .Range("A65536").End(xlUp).Row
If .Cells(r, 1) Like c And .Cells(r, 2) Like n Then
.Cells(r, 1).Resize(1, 6).Copy Cells(x, 1)
x = x + 1
End If
Next
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
xxx:
End Sub
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|