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

·j´M«ü©w¤u§@ªí¦A¥þ­¶½Æ»s¨ì¥t¤@Àɮפ¤

·j´M«ü©w¤u§@ªí¦A¥þ­¶½Æ»s¨ì¥t¤@Àɮפ¤

¦b¤½¥qªºÀɮפ¤, ¦³¨Ç¤u§@ªí¬O¤£¤Ó¦³¥Î, ¦Û¤v·Q±N¦³¥Îªº¤u§@ªí, ±q­ìÀɮפ¤¥þ­¶½Æ»s¨ì¥t¤@excelÀɤ¤, ...

¤½¥q­ìÀÉ"Basic_xxx", ±N¥H¤U¦WºÙ¥þ­¶½Æ»s¨ì "10xxx_New_v2" Àɤ¤¦P¦WºÙ¦ì¸m....
Base Station Transport Data/Data_LTE/Data_NR/LTE Cell/NR Cell/NRDUCELL/NRDUCellCoverage

·Q¦b"10xxx_New_v2"²Ä¤@­¶¤¤, ¥[¤F¤@­Ó«ö¶s, ¤@«ö¤U´N¥i±N­ìÀɤºªº¤u§@ªí½Æ»s....

§Æ±æ°ª¤â­ÌÀ°¦£§ï¤@¤U, ¥ýÁÂÁÂ.

Temp.zip (500.48 KB)

¥»©«³Ì«á¥Ñ shuo1125 ©ó 2023-3-10 11:46 ½s¿è

¦^´_ 8# Andy2483
Andy2483«e½ú¦n:
³o­Ó°ò¥»·§©À§ÚÁÙ¬O¦³ªº...ÁÂÁ´£ÂI!
§Ú¥u¯à¬Ý¬Ý°ª¤â­Ìªº¸Ñµª¨Ã¸ÕµÛ²z¸Ñ¡Aµ{«×»·¤£°÷»P¦U¦ì°Q½×±M·~°ÝÃD¡C

TOP

¦^´_ 7# shuo1125


    ÁÂÁ«e½ú¦^´_
¦pªG»Ý­n¼W¥[°õ¦æªº¬¡­¶Ã¯,¦b°}¦C¸Ì¼W¥[´N¥i¥H
Fn_ALL = Array([A2], [A3]): Sn_ALL = Array("A/B/C", "D/E/F")

½Ð«e½ú±`¤W½×¾Â¤@°_¾Ç²ß
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 6# Andy2483
Andy2483«e½ú¦n:
±N¸ê®Æ©ñ¤J°}¦C¤¤°õ¦æ¡A±ß½ú¾ÇÃÀ¤£ºëµLªk·Q¨ì³o¶ô...
ÁÙ³Ò·ÐÀ°¦£µù°O¸ÑÄÀ¡AÁÂÁ±zªº«ü¾É!!

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-3-10 08:16 ½s¿è

¦^´_ 5# shuo1125


    ÁÂÁ«e½úµoªí¦¹©«
«á¾Ç½m²ß¥H°j°é°õ¦æ°Æµ{¦¡ªº¤è®×,½Ð«e½ú°Ñ¦Ò
½Ð¦U¦ì«e½ú«ü¾É

Dim Fn_ALL, Sn_ALL, x%
'¡ô«Å§i¦P¼Ò²ÕÅܼÆ:(Fn_ALL,Sn_ALL)¬O³q¥Î«¬ÅܼÆ,x¬Oµu¾ã¼ÆÅܼÆ
Sub Copysheets()
Fn_ALL = Array([A2], [A3]): Sn_ALL = Array("A/B/C", "D/E/F")
'¡ô¥OFn_ALL³o¦P¼Ò²ÕÅܼƬO¤@ºû°}¦C,¥H[A2],[A3]¨â­ÓÀx¦s®æ±a¤J
'¡ô¥OSn_ALL³o¦P¼Ò²ÕÅܼƬO¤@ºû°}¦C,¥H"A/B/C", "D/E/F"¨â­Ó¦r¦ê±a¤J

If UBound(Fn_ALL) <> UBound(Sn_ALL) Then Exit Sub
'¡ô¦pªGFn_ALL°}¦C³Ì«á¯Á¤Þ¸¹ <> Sn_ALL°}¦C³Ì«á¯Á¤Þ¸¹!´Nµ²§ôµ{¦¡°õ¦æ
'¡ô¬¡­¶Ã¯»P¤u§@ªí¤£¹ïºÙ¤£°õ¦æ

For x = 0 To UBound(Fn_ALL)
'¡ô³]¶¶°j°é!x±q0¨ì Fn_ALL°}¦C³Ì«á¯Á¤Þ¸¹
   Call ½Æ»s«ü©w¤u§@ªí
   '¡ô¥O°õ¦æ(½Æ»s«ü©w¤u§@ªí)°Æµ{¦¡
Next
MsgBox "¤w½Æ»s§¹²¦"
End Sub
Sub ½Æ»s«ü©w¤u§@ªí()
Dim Fn$, Sn$, S, tBook As Workbook, tSht As Worksheet, sBook As Workbook, Sw As Worksheet
Application.ScreenUpdating = False
Set tBook = ThisWorkbook
Fn = Fn_ALL(x).Value & ".xlsx"
'¡ô¥OFn³o¦r¦êÅܼƬO ²ÄxÅܼƯÁ¤Þ¸¹ªºFn_ALLÅܼÆ(°}¦C)­È ³s±µ".xlsx"¦r¦ê«áªº·s¦r¦ê
'Array([A2], [A3])¬O¥HÀx¦s®æ±a¤J°}¦C,¤£¬O¦r¦ê,©Ò¥H­n¥[ .Value

On Error Resume Next: Set sBook = Workbooks(Fn): On Error GoTo 0
If sBook Is Nothing Then Set sBook = Workbooks.Open(tBook.Path & "\" & Fn)
tBook.Activate
Sn = Sn_ALL(x)
'¡ô¥OSn³o¦r¦êÅܼƬO ²ÄxÅܼƯÁ¤Þ¸¹ªºSn_ALLÅܼÆ(°}¦C)­È
For Each S In Split(Sn, "/")
    On Error Resume Next
    Set Sw = sBook.Sheets(S & "")
    Set tSht = tBook.Sheets(S & "")
    On Error GoTo 0
    If Sw Is Nothing Then MsgBox "­ìÀɧ䤣¨ì¡e" & S & "¡f¤u§@ªí!!!": GoTo s01
    If tSht Is Nothing Then MsgBox "¥»Àɮק䤣¨ì¡e" & S & "¡f¤u§@ªí¡A½Ð½T»{«á¦A­«·s°õ¦æ!!!": Exit Sub
    tSht.UsedRange.Clear
    Range(Sw.[A1], Sw.UsedRange).Copy tSht.[A1]
    Set Sw = Nothing: Set tSht = Nothing
s01: Next S
sBook.Close 0
tBook.Sheets(1).Select
Application.ScreenUpdating = True
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ shuo1125 ©ó 2023-3-9 22:10 ½s¿è

¦^´_ 2# ­ã´£³¡ªL
rcyw ª©¤j¤£¦n·N«ä­É·fª©!
­ã¤j¦n!
·Q½Ð°Ý­Y¦³¦h¤u§@ï¦h¤u§@ªí½Æ»s¬O§_¥i³æ¤@µ{§Ç½X°õ¦æ§¹¦¨....?
¸Ô¦pªþ¥ó¡A¥i§_³Ò·Ð­ã¤j©âªÅ¸Ñµª?·P¿E¤£ºÉ~!

TEXT.zip (35.08 KB)

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-3-6 11:59 ½s¿è

¦^´_ 1# rcyw
¦^´_ 2# ­ã´£³¡ªL


    ÁÂÁ rcyw«e½úµoªí¦¹¥DÃD»P½d¨Ò
ÁÂÁ ­ã´£³¡ªL«e½ú«ü¾É
«á¾Ç¾Ç²ß¤ß±o¦p¤U½Ð«e½ú«ü¾É

Sub ½Æ»s«ü©w¤u§@ªí()
Dim Fn$, Sn$, S, uBook As Workbook, uSht As Worksheet, xBook As Workbook, xS As Worksheet
'¡ô«Å§iÅܼÆ:(Fn,Sn)¬O¦r¦êÅܼÆ,S¬O³q¥Î«¬ÅܼÆ,
'(uBook,xBook)¬O¬¡­¶Ã¯ÅܼÆ,(uSht,xS)¬O¤u§@ªíÅܼÆ

Set uBook = ThisWorkbook
'¡ô¥OuBook³o¬¡­¶Ã¯ÅܼƬO ¥»¬¡­¶Ã¯
Fn = Sheet1.[P2] & ".xls"
'¡ô¥OFn³o¦r¦êÅܼƬO ²Ä¤@­Ó¤u§@ªíªº[P2]Àx¦s®æ­È,³s±µ".xls"ªº·s¦r¦ê
On Error Resume Next: Set xBook = Workbooks(Fn): On Error GoTo 0
'¡ô¥Oµ{§Ç¹J¿ù¼È¸õ¹L¿ù»~°õ¦æ¤U­Óµ{§Ç:¥OxBook³o¬¡­¶Ã¯ÅܼƬO ¦W¬°FnÅܼƪº¬¡­¶Ã¯,
'±µµÛ´N«ì´_°»¿ù

If xBook Is Nothing Then Set xBook = Workbooks.Open(uBook.Path & "\" & Fn)
'¡ô¦pªGxBookÅܼƬO¤£¦s¦b(ÁÙ¨S³Q¶}±Ò)!´N¶}±Ò¦b¥»¬¡­¶Ã¯¸ê®Æ§¨¸ÌªºFnÅܼƪº¬¡­¶Ã¯
uBook.Activate
'¡ô±Ò¥ÎuBookÅܼÆ
Sn = "Base Station Transport Data/Data_LTE/Data_NR/LTE Cell/NR Cell/NRDUCELL/NRDUCellCoverage"
'¡ô¥OSn³o¦r¦êÅܼƬO ¥H"/"³s±µ7­Ó¤u§@ªí¦WºÙªº¦r¦ê
Application.ScreenUpdating = False
'¡ô¥O¿Ã¹õ¼È¤£ÀHµÛµ{§Çªº°õ¦æ§@µ²ªGÅܤÆ
For Each S In Split(Sn, "/")
'¡ô³]¶¶°j°é!¥OS³o³q¥Î«¬ÅܼƬO ¤@ºû°}¦C¸Ìªº¤@­û,
'¤@ºû°}¦C:¥H"/"²Å¸¹¤À³ÎSnÅܼƪº¦r¦ê°}¦C

    On Error Resume Next
    '¡ô¥Oµ{§Ç¹J¿ù¼È¸õ¹L¿ù»~°õ¦æ¤U­Óµ{§Ç
    Set xS = xBook.Sheets(S & "")
    '¡ô¥OxS³o¤u§@ªíÅܼƬO xBookÅܼƬ¡­¶Ã¯(¥t¶}±ÒÀÉ)ªº ¦W¬°SÅܼƤu§@ªí
    Set uSht = uBook.Sheets(S & "")
    '¡ô¥OuSht³o¤u§@ªíÅܼƬO uBookÅܼƬ¡­¶Ã¯(¥»ÀÉ)ªº ¦W¬°SÅܼƤu§@ªí
    On Error GoTo 0
    '¡ô¥O«ì´_°»¿ù
    If xS Is Nothing Then MsgBox "¤½¥q­ìÀɧ䤣¨ì¡e" & S & "¡f¤u§@ªí!!!": GoTo s01
    '¡ô¦pªGxS¬O¤£¦s¦b!´N¸õ¥X´£µøµ¡~~!«ö½T©w¶s«á¸õ¨ì s01¼Ð¥Üªºµ{§Ç¦ì¸mÄ~Äò°õ¦æ
    If uSht Is Nothing Then MsgBox "¥»Àɮק䤣¨ì¡e" & S & "¡f¤u§@ªí¡A½Ð½T»{«á¦A­«·s°õ¦æ!!!": Exit Sub
    '¡ô¦pªGuSht¬O¤£¦s¦b!´N¸õ¥X´£µøµ¡~~!«ö½T©w¶s«á µ²§ôµ{¦¡°õ¦æ
    uSht.UsedRange.Clear
    '¡ô¥OuShtÅܼƪº¦³¨Ï¥ÎÀx¦s®æ°µ ²M°£
    Range(xS.[a1], xS.UsedRange).Copy uSht.[a1]
    '¡ô¥OxSÅܼƪº[A1]Áp¶°¦³¨Ï¥ÎÀx¦s®æÂX®i¦Ü³Ì¤p¤è¥¿½d³òÀx¦s®æ,½Æ»s¨ìuShtÅܼƪº[A1]Àx¦s®æ
    Set xS = Nothing: Set uSht = Nothing
    '¡ô¥OÄÀ©ñÅܼÆ
s01: Next S
xBook.Close 0
'¡ô¥OxBookÅܼÆÃö³¬(0¬O¤£¦sÀÉ)
uBook.Sheets(1).Select
'¡ô¥O¿Ã¹õµe­±¸¨¦b¥»ÀɲĤ@­Ó¤u§@ªí
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 2# ­ã´£³¡ªL

¦A¦¸·PÁ ­ã´£³¡ªL ¤j¤jªº¦^ÂÐ, ¯uªº¬Ù¤U¦Û¤v³v­¶copyªº®É¶¡, «D±`¦n¥Î.....:)

TOP

°ÆÀɦW xls ¶·¦Û¦æ§ó§ï¬° xlsx
·s¸ê®Æ§¨001.rar (283.25 KB)

TOP

        ÀR«ä¦Û¦b : ¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí ¤W¤@¥DÃD