- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 254
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-23
|
¦^´_ 7# luke - Sub ex()
- Dim Ay()
- Set d = CreateObject("Scripting.Dictionary")
- With sheet2
- For Each a In .Range(.[A1], .[A65536].End(xlUp))
- If IsEmpty(d(Left(a, 2))) Then
- Set d(Left(a, 2)) = a.Resize(, 10)
- Else
- Set d(Left(a, 2)) = Union(d(Left(a, 2)), a.Resize(, 10))
- End If
- Next
- End With
- r = 11
- With sheet1
- .Range("A11").CurrentRegion.Clear
- For Each a In .[B1:B5]
- If d.exists(a.Offset(, -1).Value) = True Then
- For i = 1 To a
- d(a.Offset(, -1).Value).Copy .Cells(r, 1)
- r = .Cells(11, 1).End(xlDown).Row + 1
- Next
- End If
- Next
- End With
- End Sub
½Æ»s¥N½X |
|