Sub TEST()
Dim A, xD, T$(1), N&(1)
Set xD = CreateObject("Scripting.Dictionary")
T(0) = Mid([工作表2!b3], 1, 1)
T(1) = Mid([工作表2!b3], 2, 1)
For Each A In Range([工作表1!c2], [工作表1!c1].Cells(Rows.Count, 1).End(xlUp)).Value
If A = "" Or xD(A) = 1 Then GoTo 101
If InStr(A, T(0)) Then
If InStr(A, T(1)) Then N(1) = N(1) + 1 Else N(0) = N(0) + 1
End If
xD(A) = 1
101: Next
[工作表2!A5] = N(0)
[工作表2!A6] = N(1)
End Sub
准提部林 發表於 2015-11-4 18:52
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/) |