ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¸ê®Æ·J¾ã°ÝÃD

[µo°Ý] ¸ê®Æ·J¾ã°ÝÃD

°ÝÃD»¡©ú¡G
½Ð¯q¦p¦ó°w¹ïAÄæ¥N½X¦Û°Ê½s½X(ªì©l­È¬°1)¡A¨Ì§Ç¤ñ¹ïAÄæ¥N½X³sÄò¬Û¦PªÌ¦Û°Ê½s½Xªº³Ì¤j³Ì¤p­È¡A­Y¥u¦³³æ¤@­È«h³Ì¤j³Ì¤p­È¬Û¦P¡C
¸Ô²Ó¸ê®Æ»P°ÝÃD»¡©ú¦pªþ¥ó¡AÁÂÁ¤j®aªºÀ°¦£ ^_^ TEST.zip (6.92 KB)
¤p«Ä

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-4-16 08:23 ½s¿è

¦^´_ 1# child
  1. Sub ex()
  2. Dim Ar()
  3. i = 2: s = 1  'i¬°°_©l¦C¸¹¡As¬°°_©l½s½X
  4. With Sheets("TEST")
  5. Do Until i > .[A2].End(xlDown).Row  '·í¦C¸¹¤j©ó¸ê®Æ§À¦C¸¹«h°±¤î°j°é
  6.    temp = .Cells(i, 1).Value  '°O¦íAÄæ
  7.    Do Until .Cells(i, 1) <> temp Or i > .[A2].End(xlDown).Row  '·íAÄ椣¦P®É©Î¦C¸¹¤j©ó¸ê®Æ§À¦C¸¹«h°±¤î°j°é
  8.       temp = .Cells(i, 1): k = k + 1  '°O¦íAÄæ¡Ak­pºâ½s½X
  9.       i = i + 1
  10.    Loop
  11.    ReDim Preserve Ar(j)  'ÂX¥R°}¦C
  12.    Ar(j) = Array(temp, s, k)  '±Nµ²ªG¸m¤J°}¦C
  13.    'Ar(j) = Array(temp, s-0.5, k+0.5)  '³Ì¤p´î0.5¡A³Ì¤j¥[0.5
  14.    j = j + 1  '¤U¦¸°}¦Cªº¤j¤p
  15.    s = k + 1  's¬°¤U­Ó½s½X°_©l
  16. Loop
  17. .[E7].Resize(j, 3) = Application.Transpose(Application.Transpose(Ar))  '±N°}¦C¼g¤J¤u§@ªí
  18. End With
  19. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


«ÜÁÂÁÂHsiehª©¥DªºÀ°¦£¡A¦]¥»¨­ªºµ{«×¤£°÷¡A¤£ª¾¬O§_¥i³Â·Ðª©¥DÀ°¦£µù¸Ñµ{¦¡ªºÅÞ¿è¡C
¦pªG·Q§â­pºâµ²ªG¨C¦Cªº³Ì¤j­È+0.5©M³Ì¤p­È-0.5¡A½Ð¯q¦p¦ó§ï¼g¡A¦A³Â·Ðª©¥DÀ°¦£¤F^_^
¤p«Ä

TOP

¦^´_ 3# child


   ±N³o¥y   Ar(j) = Array(temp, s, k)
§ï¦¨   Ar(j) = Array(temp, s - 0.5, k + 0.5)

TOP

¦^´_ 2# Hsieh


    «ÜÁÂÁÂHsiehª©¥DªºÀ°¦£©M±Ð¾Ç¡A·P¿E¤£ºÉ^__^
¤p«Ä

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD