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

[µo°Ý] ½Ð°Ý¥H¤Uµ{¦¡¬°¦ó¤£¯à°õ¦æ

[µo°Ý] ½Ð°Ý¥H¤Uµ{¦¡¬°¦ó¤£¯à°õ¦æ

½Ð±Ð¤j¤j­ÌÀ°¦£¸Ñ´b,
    ¤p§Ì¼g¤@­Óµ{¦¡­n±Ndata sheet ªº§½³¡¸ê®Æ¶K¨ìsheet1 µ²ªGÅã¥Ü¿ù»~
Sub Macrol()
       Dim i As Integer
       i=sheets("data").Cells(1,2)-sheets("sheet1").Cells(1,2)
       If i=1 Then
        Call §ì¸ê®Æ(7)
End Sub
Sub §ì¸ê®Æ(k)
Dim J,K As Integer
For j=1 to21
sheets("sheet1").range (Cells(j+1,k),(cells(j+1,k+2)=sheets("data").range (Cells(j+1,2),(cells(j+1,4)).......¹q¸£Åã¥Ü³o¥y¬O¿ùªº
next
End Sub
¤£ª¾­n¦p¦ó§ï¤~¯à¨Ï¥Î
DREWCHEN1

¤£¦n·N«ä§Ú¤]¬O­è¤Jªùªº
³o­Óµ{¦¡­n§@¥Î§A­n½T»{§Aªº¸ê®Æ¬O¦bdata
©ÎªÌ§A¤w¸g­n¥Î³o­Óµ{¦¡§ì§Oªº¤À­¶ªº¸ê®Æ
¨º´N¬O­n§âsheets("data")¤ºªºdata§ï¦¨³Ì²×¤À­¶

i=sheets("data").Cells(1,2)-sheets("sheet1").Cells(1,2)
sheets("sheet1").range (Cells(j+1,k),(cells(j+1,k+2)=sheets("data").range (Cells(j+1,2),(cells(j+1,4))
³o¨â¦æ³£­n§ï...«ç»ò§ï­n¬Ý§Aªº»Ý¨D§a...
°ò¥»ªº°µªk´N¬O¤H¤u§ï¸ê®Æ­¶ªº¦WºÙ
¶i¶¥ ´N¬O¥i¥H¬Ý¬O¦Û°Ê§ì²Ä¤@­Ó¤À­¶·í¸ê®Æ­¶ ©ÎªÌ¨ä¥L¤è¦¡...³oÂI§Ú´N¤£À´¤F
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

sheets("sheet1").range (sheets("sheet1").Cells(j+1,k),sheets("sheet1").(cells(j+1,k+2))
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# drewchen1
  1. Sub §ì¸ê®Æ(K)
  2. Dim J, K As Integer
  3. If K <= 0 Then
  4.     MsgBox "K¶·¤j©ó0"
  5.     Exit Sub
  6. End If
  7. For J = 1 To 21
  8.     Sheets("sheet1").Cells(J + 1, K).Resize(, 3) = Sheets("data").Cells(J + 1, 2).Resize(, 3).Value
  9. Next
  10. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ¦U¦ì¤j¤j¦^ÂÐ,Sub §ì¸ê®Æ(k) ¬O¤@ºØ°Æµ{¦¡¥Îªk,©Ò¥H³oµ{¦¡¥u¦b¥H¤U³o¥y»yªk°ÝÃD
sheets("sheet1").range (Cells(j+1,k),(cells(j+1,k+2)=sheets("data").range (Cells(j+1,2),(cells(j+1,4)).......¹q¸£Åã¥Ü³o¥y¬O¿ùªº
¸g¨Ï¥ÎhsiehªO¥D¤è¦¡,µ{¦¡°õ¦æ¤£·|¿ù»~¦ý¸ê®Æ½TµL²¾¹L¥hsheet1 ,¤£ª¾®t¦b­þ§Ú§ï¦¨
sheets("sheet1").range (sheets("sheet1").Cells(j+1,k),sheets("sheet1").(cells(j+1,k+2))=sheets("data").range (sheets("data").Cells(j+1,2),sheets("data").(cells(j+1,4))
µ²ªG¬O¸ê®ÆÄæªÅ¥Õ
gbkeeªO¥D¨Ï¥Îresize¤è¦¡¦]§Ú·ÓµÛ¥´Åã¥Ü»yªk¿ù»~,§Ú¹ïresize¥Îªk¤£À´,©Ò¥H¤£ª¾«ç°Ý°_¤£¹LÁÙ¬OÁÂÁ¦U¦ìÀ°¦£
^^
DREWCHEN1

TOP

sheets("sheet1").range (sheets("sheet1").Cells(j+1,k),sheets("sheet1").cells(j+1,k+2))=sheets("data").range (sheets("data").Cells(j+1,2),sheets("data").cells(j+1,4)).value
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁÂHsieh ªO¥D,­ì¨Ó¤Ö­Óvalue³oµ{¦¡¤w¸g¥i¥H¥Î¤F
ÁÂÁ§A
^^
DREWCHEN1

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD