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

vbaµ{¦¡¦A¶]®É¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~

vbaµ{¦¡¦A¶]®É¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~

½Ð±Ð¤j¤j:
¦]¬°¬O·s¤â½Ð¤j¤jÀ°¦£
³o¬O­þ¸Ì¥X²{°ÝÃD§r
­n¦p¦ó§ó§ï

Public Sub ¶×¥X¦¬½L»ù()
Application.ScreenUpdating = False
Sheets("²M³æ").Select
V = Range("A2").End(xlDown).Row
Dim a()
Dim b()
ReDim a(V - 1)
ReDim b(V - 1)
Sheets("¦¬½L»ùºô¸ô").Select

For i = 0 To V - 1
a(i) = Cells(i * 10 + 8, 2)
b(i) = Cells(i * 10 + 13, 2)

Next

ChDir "C:\Users\michael\Desktop\108\focvs.xlsm"(¥Ø«e§ï¬°ChDir "C:\Users\michael\Desktop\108")
Workbooks.Open Filename:="C:\Users\michael\Desktop\108\focvs.xlsm"

Sheets("²M³æ").Select
For i = 2 To Range("A1").End(xlDown).Row
Sheets("²M³æ").Select
k = Cells(i, 2)
If k = "" Then Exit For

Sheets(k).Select
h = Range("b3").End(xlDown).Row
Cells(h + 1, "b") = a(i- 2)
Cells(h + 1, "e") = b(i- 2)
Next
Windows("ºô¸ô¸ê®Æ§ì¨ú.xlsm").Activate
Sheets("ºô¸ô¦¬½L»ù").Select
Application.CutCopyMode = True
Workbooks("focus. xlsm ").Save
Workbooks("focus. xlsm ").Close
Application.ScreenUpdating = True
MsgBox "§ó·s§¹²¦!", vb0XOnly, "³qª¾"

End Sub

²{¥Ø«e¶]¨ì³o¸Ì
cells(h+1,"b")=a(i-2)
cells(h+1,"e")=b(i-2)¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~

ps:§Ú¶}¤@­ÓÀɮ׺ô¸ô¸ê®Æ§ì¨ú¤u§@ªí¦³²M³æ¤Î¦¬½L»ùºô¸ô¥t¤@­Ófocus¤u§@ªí¦³²M³æ¤Î¦U¤½¥qªº¦¬½L»ù¸ê®Æ
chdir "c:\users\michael\desktop\108"
workbooks.open filename:="c:\users\michael\desktop\108\focus.xlsm"
ºô¸ô¸ê®Æ§ì¨ú©MfocusÀɮ׳£¦s©ñ¦bc:\users\michael\desktop\108Àɮק¨¸Ì­±

ªÑ²¼.rar (138.84 KB)

michael

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-2-14 09:30 ½s¿è

¦^´_ 1# chairles59
°²³]¡G B2 = ªÑ»ù¡F B3 (§t) ¥H¤U§¡¬°ªÅ¥Õ
  1.    h = Range("b3").End(xlDown).Row
  2.    ' h = 1048576

  3.    h = Range("b2").End(xlDown).Row
  4.    ' h = 1048576
½Æ»s¥N½X
©Ò¥H
  1.    Cells(h + 1, "b") = a(i- 2)
  2.    Cells(h + 1, "e") = b(i- 2)
½Æ»s¥N½X
¬°
  1.    Cells(1048576 + 1, "b") = a(i- 2)
  2.    Cells(1048576 + 1, "e") = b(i- 2)
½Æ»s¥N½X
·íµM·|¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~
¶·§ï¦¨¡G
  1.    h = Range("B" & Rows.Count).End(xlUp).Row
  2.    ' h = 2
½Æ»s¥N½X
©ÎªÌ¬O
  1. h = Range("b1").End(xlDown).Row
  2. ' h = 2
½Æ»s¥N½X
¦p¦¹
  1.    Cells(2 + 1, "b") = a(i- 2)
  2.    Cells(2 + 1, "e") = b(i- 2)
½Æ»s¥N½X

TOP

¦^´_ 1# chairles59
¤Sµo²{§A­ì¥ý©w¸q¬°
  1.    For i = 0 To V - 1
  2.        a(i) = Cells(i * 8 + 5, 2)      '  ¦¨¥æ
  3.        b(i) = Cells(i * 8 + 9, 2)      '  Á`¶q
  4.    Next
½Æ»s¥N½X
¥Ø«e§A±N¥¦§ï¦¨
  1.    For i = 0 To V - 1
  2.        a(i) = Cells(i * 10 + 8, 2)
  3.        b(i) = Cells(i * 10 + 13, 2)
  4.    Next
½Æ»s¥N½X
§Ú¤£¤Ó©ú¥Õ§Aªº¥Î·N¡C
±µ¤U¨Ó§A¦Û¦æ¨Ó­×¥¿§a¡C

TOP

¦^´_ 1# chairles59
¥»¬ÛÃöÃþ¦ü¡u´£°Ý¡v¥H«á½Ð¦b¡yExcelµ{¦¡°Ï¡z©Î¬O¡yExcel¤@¯ë°Ï¡z¤¤´£¥Xµoªí¡A
¦Ó«D¦b¦¹  ¡yºÞ²z¤½§i¡z°Ï¸Ì´£°Ý¡A§_«h¬OµL¤H¯d·N¦ÓÀ°§AÄÀºÃªº¡C

TOP

¦^´_ 3# c_c_lai


    ·PÁ¤j¤jªº«üÂI
¦]¬°¬O·s¤H,¤S¬O­è¾ÇVBA©Ò¥H¦³¤£¹ïªº¦a¤è½Ð¦h¥]²[¸ò«ü±Ð
¥H«á§Ú·|¥h¥¿½Tªº¦a¤èµoªí
ÁÂÁÂ
michael

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD