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

excel§é¦æ¤Àµõ°ÝÃD

¦^´_ 10# lionliu
³o¬O§Ú¬O°µªºµ{¦¡½X¡A¤£ª¾¬O§_¦³­þ¦ì¤j­Ó¥i¥H§i¶D§Ú­n¦p¦ó­×§ï
  1. Sub inv()
  2. '
  3. Dim i, j, k, rcnt As Integer
  4. Dim myArray() As String

  5. rcnt = Sheets(1).Cells(Rows.Count, 3).End(xlUp).Row
  6. For i = 5 To rcnt

  7.     myArray = Split(Sheets(1).Cells(i, 3), vbLf)
  8.     'j = i + 6
  9.     For j = 0 To UBound(myArray)
  10.     Sheets(2).Cells(i, 3).Value = myArray(j)
  11.     Next j
  12.     k = i + j
  13.     Sheets(2).Cells(k, 1) = Sheets(1).Cells(i, 1)
  14.     Sheets(2).Cells(k, 7) = Sheets(1).Cells(i, 7)
  15.     Sheets(2).Cells(k, 8) = Sheets(1).Cells(i, 8)
  16.     Next i
  17. End Sub
½Æ»s¥N½X
lionliu

TOP

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD