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

vba ¦¹³B»Ý­nª«¥ó (¿ù»~ 424) ¨D¸Ñ

vba ¦¹³B»Ý­nª«¥ó (¿ù»~ 424) ¨D¸Ñ

¸Ó¦p¦ó­×§ïµ{¦¡½X©O
µ{¦¡½X¦p¤U©Ò¥Ü
¤Q¤À·PÁÂ
¦b°»¿ù¿ù»~¤¤ ¶]¨ì²Ä¤T¦æ´N·| ¸õ¥X ¿ù»~424 ><

Sub test()
ReDim arr(1 To 10000, 1 To 4)
brr = Sheet1.[a1].CurrentRegion
For i = 2 To UBound(brr)
If Len(brr(i, 5)) Then
For s = 1 To brr(i, 5)
n = n + 1
For j = 1 To UBound(brr, 2) - 1
arr(n, j) = brr(i, j)
Next j
Next s
End If
Next i
Sheet2.[a1].CurrentRegion.Offset(1).ClearContents
Sheet2.[a2].Resize(n, 4) = arr
End Sub

¬¡­¶Ã¯28-1.zip (17.77 KB)

¦^´_ 1# mickeygo


    ÅÞ¿è°ÝÃD¡A
ReDim arr(1 To 10000, 1 To 4)
brr = Sheet1.[a1].CurrentRegion
For i = 2 To UBound(brr)

2¼Ó¶Wª©¤w¸g§i¶D§A¿ù¦b³o¡A
brr = ¤u§@ªí1.[a1].CurrentRegion
§A­pºâªº­ÈÀ³¸Ó¦³¤p©ó2ªº
¦pªGUBound(brr)=1
¨º­ÓFor i = 2 To 1?
½Ð°Ý2«ç»ò¨ì1?
For°j°é¥u¯à»¼¼W¡A»¼´î´N¥X¿ù¡C
¦A¥hºô¸ô¤W¬d¤@¤UFor°j°éªºÄÝ©ÊÃö«Y¡A



°ÝÃD¸Ñ¨M°O±o¦^ÂЧiª¾¡A¬O¤@ºØ§»ª¤]¬OºØºA«×¡C
¤@¤À§V¤O¡A¤@¤À¦¬Ã¬¡C
µo°ÝÃD«e¥i¥H¥ý·j¯Á¤º¤å¬O§_¦³¬ÛÃö½d¨Ò¡C

TOP

¦^´_ 1# mickeygo


    brr = ¤u§@ªí1.[a1].CurrentRegion
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD