其他分享
首页 > 其他分享> > Test

Test

作者:互联网


Public Sub Test()
Dim RE
Set RE = CreateObject("VBScript.RegExp")
RE.Pattern = ".*wangxin.*"
Dim lala()
Dim haha


For i = 1 To ThisWorkbook.Worksheets.Count
With ThisWorkbook.Worksheets(i)
lala = .Range("A1:B9").Value
End With
For Each haha In lala
If haha <> "" And RE.Test(haha) Then
Debug.Print haha
End If

Next
Next

End Sub

标签:Dim,End,lala,haha,RE,Test
来源: https://www.cnblogs.com/syea/p/11720232.html