- ©«¤l
- 192
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 194
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2016-9-22
- ³Ì«áµn¿ý
- 2020-8-28
|
¥»©«³Ì«á¥Ñ starbox520 ©ó 2016-12-7 10:06 ½s¿è
¦^´_ 1# starbox520
¤w¼g¥X¨ÓºO~¦U¦ì°ª¤â«üÂI«üÂI><"- Sub ttt()
- Dim dic As Object, brr, i%, arr(1 To 5000, 1 To 4)
- brr = Sheet3.Range("a1").CurrentRegion
- Set dic = CreateObject("Scripting.Dictionary")
- For i = 2 To UBound(brr)
- s = brr(i, 4) & brr(i, 8) & brr(i, 9)
- If Not dic.Exists(s) Then
- n = n + 1
- dic(s) = n
- arr(n, 1) = brr(i, 8)
- arr(n, 2) = brr(i, 4)
- arr(n, 3) = brr(i, 9)
- arr(n, 4) = 1
- Else
- arr(dic(s), 4) = arr(dic(s), 4) + 1
- End If
- Next
- If n > 1 Then
- With Sheet4.Range("a1")
- .CurrentRegion.Offset(1).ClearContents
- .Offset(1).Resize(n, 4) = arr
- End With
- End If
- Set dic = Nothing
- End Sub
½Æ»s¥N½X |
|