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

»s§@²M³æ

  1. Sub test()
  2.     Dim mainRowCnt, subRowCnt, extRowCnt
  3.     extRowCnt = 1
  4.     Dim rng As Range
  5.     Set rng = Range(Range("A2"), Range("B2").End(xlDown))
  6.     For mainRowCnt = 1 To rng.Rows.Count
  7.         For subRowCnt = 1 To rng.Cells(mainRowCnt, 2)
  8.             Range("C1").Offset(extRowCnt, 0) = rng.Cells(mainRowCnt, 1)
  9.             Range("C1").Offset(extRowCnt, 1) = subRowCnt
  10.             extRowCnt = extRowCnt + 1
  11.         Next
  12.     Next
  13.    
  14. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD