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

[µo°Ý] ¦p¦ó¥Ñ SHEET1 ¸ê®Æ Âà¼g ¦bSHEET2

¦^´_ 1# aoss98
¸Õ¸Õ¬Ý
  1. Sub Ex()
  2.     Dim R As Integer, Col As Integer, AR() '():°ÊºA°}¦C , AR(1)--ÀRºA°}¦C(0 <-> 1)->[¤U­­<->¤W­­]
  3.     R = 2               '²Ä2¦C
  4.     Col = 3             '²Ä3Äæ
  5.     ReDim AR(0)                                         '[ReDim  ­«·s³]¸m]°ÊºA°}¦C:³]¸m¤¸¯À½d³ò(0<->0)->[¤U­­<->¤W­­]
  6.     AR(0) = Array("ART", "COL.", "SIZE", "QTY.")        '«ü©w¦C°}¤¸¯Àªº¤º®e
  7.     With Sheet1
  8.         Do While .Cells(R, Col) <> ""                   '²Ä2¦C->©¹¤U ¹J¨ìªÅ¥ÕÀx¦s®æ«h°±¤î°j°é
  9.             Do While .Cells(R, Col) <> ""               '²Ä3Äæ->©¹¥k ¹J¨ìªÅ¥ÕÀx¦s®æ«h°±¤î°j°é
  10.                 ReDim Preserve AR(UBound(AR) + 1)       '°ÊºA°}¦C:³]¸m¤¸¯À½d³ò (0<->¤W­­+1),Preserve:­n«O¯d¦³¤¸¯ÀÃöÁä¦r
  11.                 AR(UBound(AR)) = Array(.Cells(R, "A").Value, .Cells(R, "B").Value, .Cells(1, Col).Value, .Cells(R, Col).Value)
  12.                 Col = Col + 1                           '->©¹¥k
  13.             Loop
  14.             Col = 3
  15.             R = R + 1                                   '->©¹¤U
  16.         Loop
  17.     End With
  18.     With Sheet2
  19.         .Cells.Clear                                    'Àx¦s®æ: ²M°£
  20.         .[A1].Resize(UBound(AR) + 1, 4).Value = Application.Transpose(Application.Transpose(AR))
  21.                                                         '¨ú¥X°}¦C¤¸¯Àªº¤º®e
  22.     End With
  23. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD