|
- Sub 按钮1_Click()
- Dim brr()
- Set d = CreateObject("scripting.dictionary")
- Set dd = CreateObject("scripting.dictionary")
- Set dc = CreateObject("scripting.dictionary")
- arr = [a1].CurrentRegion
- x = WorksheetFunction.CountIf(Columns(3), 100)
- ReDim brr(1 To UBound(arr) * x, 1 To 1)
- Application.ScreenUpdating = False
- For j = 2 To UBound(arr)
- If arr(j, 3) = 100 And Left(arr(j, 2), 1) = "B" Then d(arr(j, 1)) = d(arr(j, 1)) & "," & arr(j, 2)
- dd(arr(j, 1)) = dd(arr(j, 1)) & "," & arr(j, 2) & "@" & arr(j, 3)
- Next j
- r = 0
- For j = 0 To d.Count - 1
- crr = Split(d.items()(j), ",")
- For i = 1 To UBound(crr)
- If dd.exists(crr(i)) Then
- arr = Split(dd(crr(i)), ",")
- For l = 1 To UBound(arr)
- str1 = d.keys()(j) & "&" & arr(l)
- If Not dc.exists(str1) Then
- r = r + 1
- brr(r, 1) = d.keys()(j) & "&" & arr(l)
- dc(str1) = ""
- End If
- Next l
- End If
- Next i
- Next j
- [k1].Resize(r) = brr
- Columns(11).TextToColumns Destination:=Range("K1"), DataType:=xlDelimited, _
- TextQualifier:=xlDoubleQuote, Other:=True, OtherChar:="@"
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|