- ©«¤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
|
¦^´_ 4# b9208 - Sub Sort_Data()
- Dim Ar(), Ay()
- fd = "E:\" '«ü©w¸ê®Æ§¨
- fs = Dir(fd & "*.xls") '«ü©w°ÆÀɦW
- Do Until fs = ""
- ReDim Preserve Ay(x)
- Ay(x) = fs
- x = x + 1
- fs = Dir
- Loop
- For Each a In Array("QWER", "ASDG", "FGHY", "Other Item")
- For i = LBound(Ay) To UBound(Ay)
- If Ay(i) Like "*" & a & "*" Then
- ReDim Preserve Ar(s)
- Ar(s) = Array("P" & s + 1, Ay(i))
- Ay(i) = ""
- s = s + 1
- ElseIf a = "Other Item" And Ay(i) <> "" Then
- ReDim Preserve Ar(s)
- Ar(s) = Array("P" & s + 1, Ay(i))
- s = s + 1
- End If
- Next
- Next
- [A8:B65536] = ""
- [A8].Resize(s, 2) = Application.Transpose(Application.Transpose(Ar))
- End Sub
½Æ»s¥N½X |
|