vbaµ{¦¡¦A¶]®É¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~
- ©«¤l
- 43
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 72
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- win 8.0
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2016-2-9
- ³Ì«áµn¿ý
- 2020-4-13
|
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
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-2-14 09:30 ½s¿è
¦^´_ 1# chairles59
°²³]¡G B2 = ªÑ»ù¡F B3 (§t) ¥H¤U§¡¬°ªÅ¥Õ- h = Range("b3").End(xlDown).Row
- ' h = 1048576
- h = Range("b2").End(xlDown).Row
- ' h = 1048576
½Æ»s¥N½X ©Ò¥H- Cells(h + 1, "b") = a(i- 2)
- Cells(h + 1, "e") = b(i- 2)
½Æ»s¥N½X ¬°- Cells(1048576 + 1, "b") = a(i- 2)
- Cells(1048576 + 1, "e") = b(i- 2)
½Æ»s¥N½X ·íµM·|¥X²{°õ¦æ¶¥¬q¿ù»~1004À³¥Îµ{¦¡©Îª«¥ó©w¸q¤W¿ù»~
¶·§ï¦¨¡G- h = Range("B" & Rows.Count).End(xlUp).Row
- ' h = 2
½Æ»s¥N½X ©ÎªÌ¬O- h = Range("b1").End(xlDown).Row
- ' h = 2
½Æ»s¥N½X ¦p¦¹- Cells(2 + 1, "b") = a(i- 2)
- Cells(2 + 1, "e") = b(i- 2)
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 1# chairles59
¤Sµo²{§Aì¥ý©w¸q¬°- For i = 0 To V - 1
- a(i) = Cells(i * 8 + 5, 2) ' ¦¨¥æ
- b(i) = Cells(i * 8 + 9, 2) ' Á`¶q
- Next
½Æ»s¥N½X ¥Ø«e§A±N¥¦§ï¦¨- For i = 0 To V - 1
- a(i) = Cells(i * 10 + 8, 2)
- b(i) = Cells(i * 10 + 13, 2)
- Next
½Æ»s¥N½X §Ú¤£¤Ó©ú¥Õ§Aªº¥Î·N¡C
±µ¤U¨Ó§A¦Û¦æ¨Ó×¥¿§a¡C |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤l
- 43
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 72
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- win 8.0
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2016-2-9
- ³Ì«áµn¿ý
- 2020-4-13
|
¦^´_ 3# c_c_lai
·PÁ¤j¤jªº«üÂI
¦]¬°¬O·s¤H,¤S¬Oè¾ÇVBA©Ò¥H¦³¤£¹ïªº¦a¤è½Ð¦h¥]²[¸ò«ü±Ð
¥H«á§Ú·|¥h¥¿½Tªº¦a¤èµoªí
ÁÂÁÂ |
|
michael
|
|
|
|
|