- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 253
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-22
|
¦^´_ 1# tsuan - Sub ¤ÀÃþ()
- Dim A As Range, Ay()
- Set Sht = CreateObject("Scripting.Dictionary")
- Set dic = CreateObject("Scripting.Dictionary")
- With Sheets("Á`ªí")
- For Each A In .Range(.[A2], .[A2].End(xlDown))
- For i = 5 To 9
- ar = Array(A.Offset(, 1), A.Offset(, 2), A.Offset(, 3), .Cells(A.Row, i).Value)
- If IsEmpty(dic(A & " " & .Cells(1, i))) Then
- ReDim Preserve Ay(1)
- Ay(0) = Array("³f¸¹", "³f«~´yz", "³æ¦ì", "»ù®æ") '¼ÐÃD¦C
- Ay(1) = ar '¸ê®Æ¦C
- dic(A & " " & .Cells(1, i)) = Ay '¼È¦s©ó¦r¨åª«¥ó¤¤
- Else
- Ay = dic(A & " " & .Cells(1, i)) 'Ū¥X¦r¨å¤º®e
- s = UBound(Ay)
- ReDim Preserve Ay(s + 1)
- Ay(s + 1) = ar '¥[¤J¸ê®Æ¦C
- dic(A & " " & .Cells(1, i)) = Ay '¼È¦s©ó¦r¨åª«¥ó¤¤
- End If
- Next
- Next
- End With
- For Each sh In Sheets 'Ū¨ú©Ò¦³¤u§@ªí¦WºÙ
- Sht(sh.Name) = sh.Name
- Next
- For Each ky In dic.keys
- If Not Sht.exists(ky) Then 'Y¤u§@ªí¤£¦s¦b
- With Worksheets.Add(after:=Sheets(Sheets.Count)) '·s¼W¤u§@ªí
- .Name = ky
- End With
- End If
- With Sheets(ky) '¼g¤J¤u§@ªí¸ê®Æ
- .[B1] = "À]§O:"
- .[D1] = "¼t°Ó:"
- .[C1] = Split(ky, " ")(0)
- .[E1] = Split(ky, " ")(1)
- .[A3].Resize(UBound(dic(ky)) + 1, 4) = Application.Transpose(Application.Transpose(dic(ky)))
- End With
- Next
- End Sub
½Æ»s¥N½X |
|