|
- Sub t()
- Dim arr, br, m%, i%, wb, sh, s, k, dic, f, st, num_st, num_d
- Set dic = CreateObject("scripting.dictionary")
- With Sheet1
- m = .[b1].End(4).Row
- arr = .Range("b1:d" & m)
- ReDim br(1 To m)
- For j = 1 To UBound(arr)
- s = arr(j, 1) & arr(j, 2)
- For i = 1 To Len(s)
- k = Mid(s, i, 1)
- If dic(k) = "" Then
- dic(k) = 1
- Else
- dic.Remove (k)
- End If
- Next i
- num_st = 0: num_d = 0
- For Each f In dic.keys
- st = st & f
- num_st = num_st + Asc(f)
- Next f
- For i = 1 To Len(arr(j, 3))
- num_d = num_d + Asc(Mid(arr(j, 3), i, 1))
- Next i
- If num_d = num_st Then
- br(j) = 0
- Else
- br(j) = 1
- End If
- dic.RemoveAll
- Next j
- .[e1].Resize(UBound(br)) = Application.Transpose(br)
- End With
- Set dic = Nothing
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|