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

[µo°Ý] «ü©wÀÉ®× §ì¥h­ÓÀɮ׶¡¸ê®Æ

[µo°Ý] «ü©wÀÉ®× §ì¥h­ÓÀɮ׶¡¸ê®Æ

¤p§Ì¥Ø«e»Ý¾ã²z«Ü¦h¤H¤u®É°ÝÃD§Æ±æ±q[¤u®É¾ã²z]Àɤº¶×¤J
M1~M16ªºÀɮפº®e±Æ§Ç¤è¦¡¬°
M1ÀɶצÜA1°_©l
M2ÀɶצÜA1000°_©l
M3ÀɶצÜA2000°_©l
¤@ª½±Æ¨ìM14 16000°_©l
¦UMÀɤºA1~AA1000 ¸ê®Æ³£¶·½Æ»s¨ì¤u®É¾ã²z]Àɤº
§Æ±æ¥u­n«ö¤@Àɮפº«ö¶s¤E¥i¥H§ì¨úM1~M14ÄÒ¤º¸ê®Æ¤£»Ý¤@­Ó¤@­Ó¶}±Ò
«ô°U¦U¦ì¤j¤jÀ°¦£


·s¸ê®Æ§¨.rar (933.3 KB)

¦^´_ 1# ounmaxz


    ub ¥¨¶°1()
'
' ¥¨¶°1 ¥¨¶°
'

'
    Workbooks.Open Filename:="Q:\M1.xlsx"
    Range("A4:X400").Select
    Selection.Copy
    Windows("¤u®É¾ã²z.xlsm").Activate
    Range("A3").Select
    ActiveSheet.Paste
    Windows("M1.xlsx").Activate
    ActiveWindow.Close
   
    Workbooks.Open Filename:="Q:\M2.xlsx"
    Range("A4:W400").Select
    Selection.Copy
    Windows("¤u®É¾ã²z.xlsm").Activate
    Range("A400").Select
    ActiveSheet.Paste
    Windows("M2.xlsx").Activate
    ActiveWindow.Close

¤p§Ì§Ú¥Î¿ý»sªº¤âªk°µ¥X¨Ó¤F¦ý¬O
·|¤@ª½¥X²{°Å¶Kï­n§Ú¿ï¾Ü­n¤£­n²MªÅ¥L
¦]¬°Àɮ׫ܦh¤@ª½«ö«Ü³Â·Ð¦³¿ìªk¸Ñ¨M¶Ü???

TOP

¦^´_ 2# ounmaxz
  1. Sub Ex()
  2.     Dim Rng As Range, CopyRng As Range, I As Integer
  3.     Set Rng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(1).[a1]
  4.     For I = 1 To 16
  5.         With Workbooks.Open("Q:\M" & I & ".xlsx")
  6.             Set CopyRng = .Sheets(1).UsedRange.Offset(3)
  7.             Rng.Resize(CopyRng.Rows.Count, CopyRng.Columns.Count).Value = CopyRng.Value
  8.             Set Rng = Rng.Offset(IIf(I = 1, 999, 1000))
  9.             .Close False
  10.         End With
  11.     Next
  12. End Sub
½Æ»s¥N½X

TOP

½d¨Ò¥u¦³14­ÓÀÉ®×
For I = 1 To 16
À³§ï¬°For I = 1 To 14

TOP

¦^´_ 4# lilytracy
¼Ó¥D»¡ªº:
¤p§Ì¥Ø«e»Ý¾ã²z«Ü¦h¤H¤u®É°ÝÃD§Æ±æ±q[¤u®É¾ã²z]Àɤº¶×¤J M1~M16 ªºÀɮפº®e±Æ§Ç¤è¦¡¬°

TOP

­É¦¹ÃD¤@°Ý
¦pªG¥u­n¶×¤JM1,M2,M3¨ìbook1
¥Bbook1¤¤¡A¶×¤Jªº¸ê®ÆM1~M3¶¡¤£¯dªÅ¥Õ
¤p§Ì±NGBKEEª©¥Dªºµ{¦¡§ï¼g¦p¤U
  1. Sub Ex()
  2.     Dim Rng As Range, CopyRng As Range, I As Integer
  3.     Set Rng = Workbooks("Book1").Sheets(1).[a65536]
  4.     For I = 1 To 3
  5.         With Workbooks.Open("C:\Users\tt\Desktop\·s¼W¸ê®Æ§¨\" & I & ".xls")
  6.                 ActiveSheet.Range("a4", ActiveCell.SpecialCells(xlLastCell)).Copy Rng.End(xlUp).Offset(1)
  7.                 .Close False
  8.         End With
  9.     Next
  10. End Sub
½Æ»s¥N½X
·Q½Ð±Ðªº¬O
¤@¥¹¬Ù²¤¤FActiveSheet,´N·|¥X²{"ª«¥ó¤£¤ä´©¦¹ÄݩʩΤèªk"
¬°¤°»òActiveSheet¤@©w­n¼g¥X¨Ó¤~¯à°õ¦æ¡H
¶}Àɮתº®É­Ô¡A¶}¥X¨ÓªºÀɤ£¬O³B©óActivateªºª¬ºA¶Ü¡H
´ú¸Õ¹L¦b¨S¦³°õ¦æ¶}Àɰʧ@ªº®É­Ô¡A¬Ù²¤ActiveSheet¬O¨S¦³°ÝÃDªº»¡¡C:Q

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-24 07:46 ½s¿è

¦^´_ 6# davidoff
µ{¦¡½X §ï¼g¦b¤@¯ë¼Ò²Õ ©ÎThisWorkbook¼Ò²Õ
§Aªºµ{¦¡½X ¬O¼g¦b ¤u§@ªíª«¥ó¼Ò²Õ   
Range ¨S«ü©ú¤u§@ªí ´N¬O±MÄÝ©ó³o¤u§@ªíª«¥ó¼Ò²Õªº¤u§@ªíRange
§A¤£¯à¦b¨ä¥L¤u§@ªí¤¤ °õ¦æ³o ±MÄÝ©ó³o¤u§@ªíª«¥ó¼Ò²Õªº¤u§@ªíRange

TOP

¦^´_ 3# GBKEE


    ·PÁ¤j¤jªºÀ°¦£
   ¦ý¬O¦]¬°ÀɦW¥@¤H¦W¬G¥ÎM1¨Ó´À¥N
    ¦pªG¨Ï¥Î¦¹µ{¦¡·|³y¦¨µLªkŪ¨ú¸ê®Æ
   ¬O§_¥i¦b§ì¨úªº¥DÀÉEXCELª½±µ¼g¤J¸ô®|¤ÎÀɦW
   ¦A¥h§ì¨ú©Ò­nªº¸ê®Æ

TOP

¦^´_ 8# ounmaxz
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, NameRng As Range, CopyRng As Range, E As Range
  4.     Set NameRng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(2).[A1:A16]    '¤H¦Wªº½d³ò ©Î¬O §¹¾ãªº¸ô®|ÀɮצWºÙ
  5.     Set Rng = Workbooks("¤u®É¾ã²z.xlsm").Sheets(1).[a1]
  6.     For Each E In NameRng
  7.         With Workbooks.Open("Q:\" & E & ".xlsx")  'E=¤H¦W
  8.         'With Workbooks.Open(E)   '¦p E = §¹¾ãªº¸ô®|ÀɮצWºÙ
  9.             Set CopyRng = .Sheets(1).UsedRange.Offset(3)
  10.             Rng.Resize(CopyRng.Rows.Count, CopyRng.Columns.Count).Value = CopyRng.Value
  11.             Set Rng = Rng.Offset(IIf(Rng.Row = 1, 999, 1000))
  12.             .Close False
  13.         End With
  14.     Next
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_ 9# GBKEE


    ¥i«ü©w§ì¨úM1   A4:AD400¸ê®Æ
    ¤u®É¬ö¿ýÀɤº±N°lÀH«e¤@µ§¸ê®Æ¤¤¶¡¤£­n¯dªÅ¥Õªí®æ¶Ü???

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD