- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 259
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-30
|
¦^´_ 6# man65boy - Private Sub CommandButton1_Click()
- Dim ar()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- For Each sh In Sheets
- d1(sh.Name) = ""
- Next
- r = Range("I65536").End(xlUp).Row '¸ê®Æ§À
- For j = r To 2 Step -1
- Set a = Cells(j, "I")
- If d1.exists(a.Value) Then
- If IsEmpty(d(a.Value)) Then
- ReDim ar(0)
- ar(0) = a.Offset(, -8).Resize(, 10).Value
- d(a.Value) = ar
- Else
- ar = d(a.Value)
- i = UBound(ar) + 1
- ReDim Preserve ar(i)
- ar(i) = a.Offset(, -8).Resize(, 10).Value
- d(a.Value) = ar
- End If
- Rows(j).Delete '§R°£¸ê®Æ¦C
- End If
- Next
- For Each ky In d.keys
- For i = UBound(d(ky)) To 0 Step -1
- Sheets(ky).[A65536].End(xlUp).Offset(1, 0).Resize(1, 10) = d(ky)(i)
- Next
- Next
- End Sub
½Æ»s¥N½X |
|