|
参与一下。。。
- Sub ykcbf() '//2024.7.24
- Set d = CreateObject("Scripting.Dictionary")
- r = Cells(Rows.Count, 2).End(3).Row
- arr = [a1].Resize(r, 5)
- For i = 1 To UBound(arr)
- st = arr(i, 2) & arr(i, 3)
- d.RemoveAll
- For x = 1 To Len(Trim(st))
- s = Mid(st, x, 1)
- d(s) = d(s) + 1
- Next
- st1 = ""
- For Each k In d.keys
- If d(k) = 1 Then
- st1 = st1 & k
- End If
- Next
- If Len(st1) = Len(arr(i, 4)) Then
- ft = 0
- For x = 1 To Len(st1)
- s = Mid(st1, x, 1)
- If InStr(CStr(arr(i, 4)), s) Then
- ft = ft + 1
- End If
- Next
- If ft = Len(st1) Then
- arr(i, 5) = 0
- Else
- arr(i, 5) = 1
- End If
- Else
- arr(i, 5) = 1
- End If
- Next
- [e1].Resize(r, 1) = Application.Index(arr, 0, 5)
- Set d = Nothing
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
2
查看全部评分
-
|