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

¬J¦³VB¡A¦p¦ó§tµù¸Ñ½Æ»s¹L¥h?

¬J¦³VB¡A¦p¦ó§tµù¸Ñ½Æ»s¹L¥h?

¥»©«³Ì«á¥Ñ dakiu ©ó 2018-11-29 11:43 ½s¿è

¦U¦ì«e½ú¦n:
¥H¤U¬O1­Ósheetªº¤º®e¤À§O¨Ì«ü©wÀx¦s®æ½Æ»s¦Ü«Ü¦h¨Ì«ü©wexcelÀɦWªºÀx¦s®æ¤º¡A¦ý²{¦b»Ý­n§tµù¸Ñ¥²»Ý¤]¯à½Æ»s¡A¦ý¤£ª¾¥i§_¦bµ{¦¡½X¤º¥[¤J¡A¥Ø«eµù¸ÑµLªk½Æ»s¤¤¡AÀµ½Ð«e½ú«ü¾É¡A·PÁÂ!

Sub ¦^¦s¤@¦¸¤G¦¸¸ê®Æ()

''¦^¦s®É¶·½T»{sheet«ü©w¦ì¸m¬O§_¥¿½T

Dim A As Range, B As Range, N%
Dim X As New Application, FN$, xB As Workbook
For Each A In [$e$2:$bs$2] ''¨üµû¤H¼Æ½d³ò-¶È¤u¸¹¦C
    N = N + 1
    FN = ThisWorkbook.Path & "\" & "5--¦Ûµû§¹¦¨¸ê®Æ" & "\" & A.Value & ".xlsm" ''¥»ÀÉ©ñ¦b§ì¨úÀɮפW¤@¼h
    If Dir(FN) = "" Then GoTo 101
    Set xB = X.Workbooks.Open(FN)
For Each B In [$e$4:$e$55] ''¿ï¾Ü¦^¦sªºÀx¦s®æ¦ì¸m
    On Error Resume Next
    If Range(B.Value) Is Nothing Then GoTo 102
    On Error GoTo 0
    xB.Sheets(2).Range(B).Value = B(1, N + 1)
102: Next
    xB.Close 1
101: Next

End Sub

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2018-12-1 11:57 ½s¿è

ÁÙ¬O¥Îª½±µ¶}±ÒÀɮקa!!!  

Sub ¦^¦s¤@¦¸¤G¦¸¸ê®Æ()
Dim A As Range, B As Range, N%
Dim FN$, xB As Workbook
For Each A In [$e$2:$bs$2] ''¨üµû¤H¼Æ½d³ò-¶È¤u¸¹¦C
    N = N + 1
    FN = ThisWorkbook.Path & "\" & "5--¦Ûµû§¹¦¨¸ê®Æ" & "\" & A.Value & ".xlsm" ''¥»ÀÉ©ñ¦b§ì¨úÀɮפW¤@¼h
    If Dir(FN) = "" Then GoTo 101
    Application.ScreenUpdating = False
    Set xB = Workbooks.Open(FN)
    ThisWorkbook.Activate
    For Each B In [$e$4:$e$55] ''¿ï¾Ü¦^¦sªºÀx¦s®æ¦ì¸m
        On Error Resume Next
        If Range(B.Value) Is Nothing Then GoTo 102
        On Error GoTo 0
        B(1, N + 1)copy xB.Sheets(2).Range(B)
    102: Next
    xB.Close 1
101: Next
End Sub

TOP

ÁÂÁª©¤j:
§V¤O®ø¤Æ§l¦¬¤¤!

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD