ªð¦^¦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 : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD