- ©«¤l
- 227
- ¥DÃD
- 3
- ºëµØ
- 1
- ¿n¤À
- 273
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-3-22
- ³Ì«áµn¿ý
- 2013-1-29
|
½Ð°Ý¸Ó¦p¦ó¼g¥¨¶°©O?
§ÚÂI¿ï½Æ»s¥N½X¶K¤W«á±o¨ì¥H¤Uµª®×
¤U¸ü (37.34 KB)
2 ¤p®É«e
dragonbx µoªí©ó 2011-5-6 17:25  - Private Sub CommandButton1_Click()
- Dim d As Object, d2 As Object, a, arr, i&, m&, r&
- Set d = CreateObject("scripting.dictionary")
- Set d2 = CreateObject("scripting.dictionary")
- a = Range([a2], [b65536].End(3))
- ReDim arr(1 To UBound(a), 1 To 250)
- For i = 1 To UBound(a)
- If d(a(i, 1)) = "" Then
- m = m + 1
- d(a(i, 1)) = m
- d2(a(i, 1)) = 2
- arr(1, d(a(i, 1))) = a(i, 1): arr(2, d(a(i, 1))) = a(i, 2)
- Else
- d2(a(i, 1)) = d2(a(i, 1)) + 1
- arr(d2(a(i, 1)), d(a(i, 1))) = a(i, 2)
- r = IIf(r > d2(a(i, 1)), r, d2(a(i, 1)))
- End If
- Next
- [e:iv] = ""
- [f1].Resize(r, m) = arr
- ReDim arr(1 To r, 0)
- For i = 1 To r - 1
- arr(i, 0) = [b1] & i
- Next
- [e2].Resize(r - 1, 1) = arr
- End Sub
½Æ»s¥N½X |
|