- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 81
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-4-5
               
|
¦^´_ 1# hu0318s
°ò¥»¾Þ§@¤ñ¸ûÁcÂø
¥ÎVBA»²§U§a- Sub ¨ú®ø´«¦æ()
- Dim A As Range, ar()
- Set dic = CreateObject("Scripting.Dictionary")
- With ActiveSheet
- k = .Range(.[A1], .[A1].End(xlToRight)).Count
- For Each A In .Columns("A:A").SpecialCells(xlCellTypeConstants)
- ReDim ar(k)
- For i = 0 To k - 1
- ar(i) = Split(A.Offset(, i), Chr(10))
- Next
- dic(A.Value) = ar
- Erase ar
- Next
- .Cells.ClearContents
- r = 1: t = 1
- For Each ky In dic.keys
- For i = 0 To k - 1
- ay = dic(ky)
- t = IIf(UBound(ay(i)) + 1 > t, UBound(ay(i)) + 1, t)
- .Cells(r, 1).Offset(, i).Resize(UBound(ay(i)) + 1, 1) = Application.Transpose(ay(i))
- Next
- r = r + t
- Next
- End With
- End Sub
½Æ»s¥N½X
¦X¨ÖÀx¦s®æ.zip (21.53 KB)
|
|