- ©«¤l
- 29
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 82
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- OFFICE2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-6-14
- ³Ì«áµn¿ý
- 2020-9-14
|
¥»©«³Ì«á¥Ñ hu0318s ©ó 2017-9-16 16:48 ½s¿è
¦^´_ 3# hu0318s
dear ¤j¤j:èè§Ú¦³½m²ß¥h³B²z,¦b10µ§¥H¤º³£¤ñ¸û¨S°ÝÃD,¦ý¹³§Ú±`±`¦¬¨ìÀɮ׳£¬O¤W¤dµ§,Åܦ¨¦n¹³¥u¦³«e10µ§¥i¥H§¹¦¨ ¨ä¥L³£·|²MªÅ
§Ú¦³½m²ß¥hקï¤F¸Ñ ,¦ý§Úµo²{§Ú¦n·Q·d¯{,¥i¥H½Ð±Ð¤j¤j. ¦b³oÃ䪺offiset §Ún¦p¦óקï¤~¥i¥H§â¸ê®Æ¼g¶iÀx¦s®æ Cells(r, 1).Offset(, i).Resize(UBound(ay(i)) + 1, 1) = Application.Transpose(ay(i))
§Úªþ¤W§Ú¦¬¨ìªºÀÉ®×
¤U±¬O
§Úק諸- Sub ¨ú®ø´«¦æ()
- Dim A As Range, ar()
- Set dic = CreateObject("Scripting.Dictionary")
- With ActiveSheet
- k = .Range(.[A1], .[A1].End(xlDown)).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, 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, i).Resize(UBound(ay(i)) + 1, 1) = Application.Transpose(ay(i))
- Next
- r = r + t
- Next
- End With
½Æ»s¥N½X |
|