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

[µo°Ý] §ïµ½®Ä²v°ÝÃD--for-each-next

¦^´_ 10# oobird


    ·PÁÂoobird¤j¤jªº«ü¾É
¥u¬O¤p§Ì·M¬N..©Ò¥HÁÙ¦³´X­Ó°ÝÃD..·Ð½Ð¤j¤j¸Ñ´b~~~
Dim a, r%, i%, arr()
==>°}¦Carrªº«Å§i¬A¸¹¬OªÅ¥Õ..³o¥Nªí¬O«Å§i­þºØ°}¦C?
With Sheets("1")
      a = .Range(.[c10], .[e10].End(4))
==>range¬A¸¹¸Ìªº.[c10], .[e10]³o¼Ë»yªk¬O¦ó·N¸q?¤p§Ì¬Ý¤£À´,¤p§Ì¥u¬Ý¹L«e­±¨S¦³"ÂI"ªº
==>End(4)...³o¼Ëªº»yªk..¤p§Ì¨S¬Ý¹L..©Ò¥H¤£À´~~~~
End With
r = 1
For i = 1 To UBound(a)
       ReDim Preserve arr(1 To 3, 1 To r)
      arr(1, r) = a(i, 1): arr(2, r) = a(i, 2): arr(3, r) = a(i, 3)
        r = r + 6
Next
    Sheets("2").[c4].Resize(r - 6, 2) = Application.Transpose(arr)
    Sheets("2").[k4].Resize(r - 6, 1) = Application.Transpose(Application.Index(arr, 3))

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD