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

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

  1. Sub yy()
  2.     Dim a, r%, i%, arr()
  3.     a = Sheet1.[c10].CurrentRegion
  4.     r = 1
  5.     For i = 1 To UBound(a)
  6.         ReDim Preserve arr(1 To 3, 1 To r)
  7.         arr(1, r) = a(i, 1): arr(2, r) = a(i, 2): arr(3, r) = a(i, 3)
  8.         r = r + 6
  9.     Next
  10.     Sheet2.[c4].Resize(r - 6, 2) = Application.Transpose(arr)
  11.     Sheet2.[k4].Resize(r - 6, 1) = Application.Transpose(Application.Index(arr, 3))

  12. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD