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

§Q¥Î°}¦C¨Ó½Æ»s¶K¤W??

§Q¥Î°}¦C¨Ó½Æ»s¶K¤W??

°²¦p¦³A1~50­ÓÀÉ®×
­n½Æ»s¨C­ÓÀɮתºRANGE(¡§A1:C20¡¨)¦A¥[¤W¤@¦CD1~20=X
µM«á´¡¤J¨ìB¤u§@ïrange(¡§A1¡¨)
¦pªG¤@­Ó¤@­Ó¥Îcopy-> insert¤è¦¡EXCEL·|¥X²{¿ù»~(°õ¦æ¶¥¬q¿ù»~¡¦1004¡¦ ¬°ÁקK¸ê®Æ¿ò¥¢,EXCELµLªk±NªÅ¥ÕÀx¦s®æ²¾¥X¤u§@ªí¡K¡K¡K.)

¦pªG§Q¥Î°}¦C¤è¦¡
±N50­ÓÀɮ׸ê®Æ¼g¤J°}¦C¦A¤@¦¸¶K¨ìÀÉ®×B
½Ð°Ý­n¦p¦ó¼g???
ÁÂÁÂ
¤p¤Hª«

¦^´_ 1# jasonwu0114


   
°²¦p¦³A1~50­ÓÀÉ®× (ÁÙ¬O¤u§@ªí )
­n½Æ»s¨C­ÓÀɮתºRANGE(¡§A1:C20¡¨)¦A¥[¤W¤@¦CD1~20=X  ¤°»ò·N«ä
=>­n½Æ»s A1:D20  ¹ï¶Ü?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ jasonwu0114 ©ó 2014-2-21 13:12 ½s¿è

¦^´_ 2# GBKEE


    °²¦p¦³A1~50­ÓÀÉ®× (ÁÙ¬O¤u§@ªí )
¦³50­Óworkbooks(A1).sheet("¤u§@ªí1"),workbooks(A2).sheet("¤u§@ªí1")...........................

­n½Æ»s¨C­ÓÀɮתºRANGE(¡§A1:C20¡¨)¦A¥[¤W¤@¦CD1~20=X  ¤°»ò·N«ä
=>­n½Æ»s A1:D20  ¹ï¶Ü?

A1:C20¬O¤u§@ªí¤º¸ê®Æ
·Q­n¦b¨C¤@ ¦C«á­±¥[¤W¤@Äæ¤é´Á(EX:2014/02/21)
Åܦ¨A1:D20

³Â·ÐGBKEE¤F
ÁÂÁÂ
¤p¤Hª«

TOP

¦³°ª¤â¥i¥HÀ°¦£¶Ü
·P®¦
¤p¤Hª«

TOP

¦^´_ 3# jasonwu0114
¥ý¥Î¦P¤@ÀÉ®×2­Ó¤u§@ªí¡A¼g¤J²Ä3¤u§@ªí¥Ü½d
  1. Sub ex()
  2. Dim ar(), Ay(1 To 20, 1 To 4)
  3. For i = 1 To 2
  4. With Sheets(i)
  5. For j = 1 To 20
  6.   For k = 1 To 3
  7.      Ay(j, k) = .Cells(j, k).Value
  8.   Next
  9.   Ay(j, 4) = Date
  10. ReDim Preserve ar(s)
  11. ar(s) = Application.Index(Ay, j)
  12. s = s + 1
  13. Next
  14. Erase Ay
  15. End With
  16. Next
  17. Sheets(3).[A1].Resize(s, 4) = Application.Transpose(Application.Transpose(ar))
  18. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh
  1. Option Explicit
  2. '±N50­ÓÀɮ׸ê®Æ¼g¤J°}¦C¦A¤@¦¸¶K¨ìÀÉ®×B
  3. Sub Ex()
  4.     Dim Wb(1 To 2) As Workbook, AR(), S As Integer, E As Range
  5.     Set Wb(1) = Workbooks("ÀÉ®×B")  '§ó¥¿¬°ÀÉ®×Bªº¦WºÙ
  6.     For Each Wb(2) In Workbooks  '50­ÓÀɮפw¶}±Ò §t ÀÉ®×B
  7.         If Wb(2).Name <> Wb(1).Name Then
  8.         For Each E In Wb(2).Sheets(1).[A1:C20].Rows
  9.             ReDim Preserve AR(1 To 4, 0 To S)
  10.             AR(1, S) = E.Cells(1)
  11.             AR(2, S) = E.Cells(2)
  12.             AR(3, S) = E.Cells(3)
  13.             AR(4, S) = Date
  14.             S = S + 1
  15.         Next
  16.         End If
  17.     Next
  18.     With Wb(1).Sheets(1).[a1]  'ÀÉ®×B
  19.         .CurrentRegion = ""
  20.         .Resize(S, 4) = Application.WorksheetFunction.Transpose(AR)
  21.     End With
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# Hsieh
«D±`·PÁÂ
¬ã¨s¤¤
    ¥t¥~·Q½Ð±Ð
ar(s) = Application.Index(Ay, j)
Application.Transpose(Application.Transpose(ar))
³o2¦æªº·N«ä¬O???
¤p¤Hª«

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD