- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 249
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-17
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-4-16 08:23 ½s¿è
¦^´_ 1# child - Sub ex()
- Dim Ar()
- i = 2: s = 1 'i¬°°_©l¦C¸¹¡As¬°°_©l½s½X
- With Sheets("TEST")
- Do Until i > .[A2].End(xlDown).Row '·í¦C¸¹¤j©ó¸ê®Æ§À¦C¸¹«h°±¤î°j°é
- temp = .Cells(i, 1).Value '°O¦íAÄæ
- Do Until .Cells(i, 1) <> temp Or i > .[A2].End(xlDown).Row '·íAÄ椣¦P®É©Î¦C¸¹¤j©ó¸ê®Æ§À¦C¸¹«h°±¤î°j°é
- temp = .Cells(i, 1): k = k + 1 '°O¦íAÄæ¡Akpºâ½s½X
- i = i + 1
- Loop
- ReDim Preserve Ar(j) 'ÂX¥R°}¦C
- Ar(j) = Array(temp, s, k) '±Nµ²ªG¸m¤J°}¦C
- 'Ar(j) = Array(temp, s-0.5, k+0.5) '³Ì¤p´î0.5¡A³Ì¤j¥[0.5
- j = j + 1 '¤U¦¸°}¦Cªº¤j¤p
- s = k + 1 's¬°¤UÓ½s½X°_©l
- Loop
- .[E7].Resize(j, 3) = Application.Transpose(Application.Transpose(Ar)) '±N°}¦C¼g¤J¤u§@ªí
- End With
- End Sub
½Æ»s¥N½X |
|