- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
°ÝÃD3- Sub yy()
- Dim d As Object, a, b, i&, j%, k%, m%, n%
- Set d = CreateObject("Scripting.Dictionary")
- k = 1
- With Sheets("ASD1")
- a = .Range(.[a2], .[c65536].End(3))
- ReDim b(1 To UBound(a), 1 To 3)
- For i = 1 To UBound(a)
- If Len(a(i, 2)) = 6 Then
- m = m + 1
- For j = 1 To 3
- b(m, j) = a(i, j)
- Next
- End If
- Next
- Do
- For i = 1 To m
- If b(i, 2) <> "" Then
- If Not d.exists(b(i, 1)) Then
- d(b(i, 1)) = Array(b(i, 1) & "", b(i, 2), b(i, 3))
- b(i, 2) = "": n = n + 1
- End If
- End If
- Next
- If d.Count > 0 Then
- Sheets("BF12").Cells(1, k).Resize(, 3) = .[a1:c1].Value
- Sheets("BF12").Cells(2, k).Resize(d.Count, 3) = Application.Transpose(Application.Transpose(d.items))
- d.RemoveAll
- k = k + 3
- End If
- Loop Until n = m
- End With
- End Sub
½Æ»s¥N½X |
|