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

[µo°Ý] ·Q¦b¤£¦PªºÀɮפ¤¡A®»¨ú¤£¦Psheet¤¤¬Û¦P¦ì¸mªº¸ê®Æ¡A¦³¾÷·|¹ê²{¶Ü?

[µo°Ý] ·Q¦b¤£¦PªºÀɮפ¤¡A®»¨ú¤£¦Psheet¤¤¬Û¦P¦ì¸mªº¸ê®Æ¡A¦³¾÷·|¹ê²{¶Ü?

·Q½Ð±Ð¦U¦ì¥ý¶i¡A¦b¾ã²z¸ê®Æ®É¡A»Ý­n±NÀɮפ¤ªºÄæ¦ì"B"¡B"C"¡B"D"¡B"P"¡B"Z"¡B"AJ"¡B"AT"¡B
"BL"¡B"BM"¡B"BP"¡B"BQ"¡B"BR"¡B"CM"¡B"CW"¡B"DG"¡B"EB"¡B"EC"µ¥17¦æªº¸ê®Æ½Æ»sÀx¦s®æªº¼Æ­È
(¦³¨Ç¬O¤½¦¡ºâ¥X¨Óªº)¡A¨ú¼Ëªº½d³ò¬O¦b13¦C¨ì268¦C¡A¨Ã¶K¨ì§O¤@­Ó·sªºSHEET¤º¥h°µ¶i¤@¨B¸ê®Æ¹Bºâ¡A
§Ú¥ý«e¬O¥Î¿ý»s¥¨¶°ªº¤è¦¡¨Ó°µ¡A¦ý¬O¦]¬°¨C¦¸ªºSheet¦WºÙ³£¤£¬Û¦P¡A©Ò¥H­n¤@ª½¥h§ï¥¨¶°¸ê®Æ¡A
­Y·Q¨C¦¸¦b¤£¦PªºÀɮפ¤¡A´£¨úsheet¤ºªº¸ê®Æ(sheet¦WºÙ¤]·|ÅÜ)¡A¦ý¦ì¸m³£¬O¦b²Ä¤­sheet¶}©l¡A
¥B­Y¦³¦h­Ósheet¡A¸ê®Æ­n¨Ì§Ç±Æ¦C½Æ»s¡A¨Ã¦b·ssheet¤º¨Ì§Ç¶K¤W¡A¤£ª¾¬O§_¦³¾÷·|¹ê²{??ÁÂÁÂ!!

B.zip (436.23 KB)

¦^´_ 1# chres
  1. Sub ex()
  2. Dim Ay(), Sh As Worksheet
  3. ar = Array("B", "C", "D", "P", "Z", "AJ", "AT", "BL", "BM", "BP", "BQ", "BR", "CM", "CW", "DG", "EB", "EC")
  4. Set Sh = Sheets.Add(after:=Sheets(Sheets.Count))
  5. For i = 5 To 6
  6. With Sheets(i)
  7.   For j = 0 To UBound(ar)
  8.     ReDim Preserve Ay(s)
  9.     Ay(s) = Application.Transpose(.Range(ar(j) & 13 & ":" & ar(j) & 268))
  10.     s = s + 1
  11.   Next
  12.   Sh.Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(256, UBound(ar) + 1) = Application.Transpose(Ay)
  13.   s = 0
  14.   Erase Ay
  15. End With
  16. Next
  17. Sh.Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
  18. Set Sh = Nothing
  19. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

ÁÂÁÂH¤j¡A³o­Ó¥¨¶°¦b³æÀɮפ¤¥i¥H°õ¦æ¡A¨S¦³°ÝÃD¡A
­Y¬O¤£¦PÀɮצWºÙªº¸Ü¡A¬O¤£¬O§Ú­n¦bµ{¦¡«e­±¥[¤W
workbooks("xxx.xls").activate ©O?¤£¹L¦n¹³¨C¦¸³£­n§ï´N¬O¤F~~
¥t¥~­Y­n±q²Ä6¦C¶}©l¶K¤W¸ê®Æ¡AÀ³¸Ó¦b¨º¸Ì°µ½Õ¾ã©O?ÁÂÁÂ!!

TOP

¦^´_ 3# chres
­Y­n±q²Ä6¦C¶}©l¶K¤W¸ê®Æ,7¨ì12¦C¬O¦X¨ÖªºÀx¦s®æ¸ê®Æ·|¥¢¯u

¨Ï¥Î¤£¦PÀɮצWºÙ,­×§ï¦p¤U
  1. Option Explicit
  2. Sub ex()
  3. Dim Ay(), Sh As Worksheet, Ar, I As Integer, J As Integer, S As Integer
  4. Dim WB As Workbook
  5. Set WB = ActiveWorkbook              '§@¥Î¤¤ªº¬¡­¶Ã¯
  6. 'Set WB = Workbooks("A.xls")           '«ü©wªº¬¡­¶Ã¯

  7. Ar = Array("B", "C", "D", "P", "Z", "AJ", "AT", "BL", "BM", "BP", "BQ", "BR", "CM", "CW", "DG", "EB", "EC")
  8. Set Sh = WB.Sheets.Add(after:=Sheets(Sheets.Count))
  9. For I = 5 To 6
  10. With WB.Sheets(I)
  11.   For J = 0 To UBound(Ar)
  12.     ReDim Preserve Ay(S)
  13.     Ay(S) = Application.Transpose(.Range(Ar(J) & 13 & ":" & Ar(J) & 268))
  14.     S = S + 1
  15.   Next
  16.   Sh.Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(256, UBound(Ar) + 1) = Application.Transpose(Ay)
  17.   S = 0
  18.   Erase Ay
  19. End With
  20. Next
  21. Sh.Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
  22. Set Sh = Nothing
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD