|
- Sub 凌空一羽()
- Dim sht As Worksheet
- Set d = CreateObject("Scripting.Dictionary")
- For Each sht In Worksheets
- If sht.Name <> "Sheet1" Then
- ar = sht.Range("b6:c27")
- For i = 1 To UBound(ar)
- s = ar(i, 1)
- If Not d.exists(s) Then
- d(s) = Array(s, 1, IIf(ar(i, 1) <> "", sht.Name, ""))
- Else
- k = d(s): k(1) = k(1) + 1: k(2) = k(2) & "," & IIf(ar(i, 1) <> "", sht.Name, "")
- d(s) = k
- End If
- Next
- End If
- Next
- ReDim brr(1 To d.Count, 1 To 2)
- For i = 1 To d.Count
- If Application.Index(Application.Transpose(d.items), 1)(i) <> "" And Application.Index(Application.Transpose(d.items), 2)(i) > 1 Then
- n = n + 1
- brr(n, 1) = Application.Index(Application.Transpose(d.items), 1)(i)
- brr(n, 2) = Application.Index(Application.Transpose(d.items), 3)(i)
- End If
- Next
- [a2].Resize(n, 2) = brr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|