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

[µo°Ý] ¡¹(µo°Ý)¤@­Ó¸ê®ÆÄæ¦ì¤£¹ïºÙªº¸ê®Æ¿z¿ï°ÝÃD

¦^GBKEE¤j¡G§Ú­è§ï¤Fsheets3ªº²Ä¤@¦C®æ¦¡»P¨ä¥Lsheets¤@­P¡A¦ýÁÙ¬O¸õ¤@¼Ëªº¿ù»~¡C

§Ú¥ý§â¸ê®Æ±H¥X¡A¥Î¤p¹q¸£¶}2003ª©¥»¸Õ¬Ý¬Ý¡Aµ¥¤@¤U§Ú·|¦^¨Ó½s¿è¤å³¹¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-1-5 21:58 ½s¿è

¦^´_ 11# yagami12th
For Each E In Sheets                                     '¤u§@ªí1,¤u§@ªí2,¤u§@ªí3
       If E.FilterMode Then E.AutoFilterMode = False         '¦³¿z¿ï®É ¨ú®ø[¿z¿ï]
       Debug.Print E.Name                                '¬Ý¿ù»~¬O¨º¤@¤u§@ªí
For i = E.[A2] To E.[A2].End(xlDown)                 '¤é´Á[A2]¨ì To E.[A2].End(xlDown) ¥²¶·¬O¤é´Á         
      E.AutoFilterMode = False


¦p¹Ï : ¦³¿ù»~®É ¥´¶} [ §Y®É¹Bºâ ] µøµ¡ ¬d¬Ý¬O¨º¤@­Ó¤u§@ªí¥X¿ù


TOP

¥»©«³Ì«á¥Ñ yagami12th ©ó 2012-1-5 23:29 ½s¿è

¦^GBKEE¤j¡G
½Ð±ÐGBKEE¤j¡A¿ù¦b²Ä¤@­Ó¤u§@ªí¡A¤é´Á¸ê®Æ³£¥¿±`¡C¦pªG§â·s¼Wsheetsªº¤è¦¡¡A§ï¦¨¶}¥þ·sªºexcelÀÉ¡A¤À12­Ósheets¥h¶K¿z¿ï¦nªº¸ê®Æ¡A³o¼Ë·|¤£·|¤ñ¸ûok



­è¸ÕµÛ§â¤u§@ªí§R¨ì¥u³Ñ¤u§@ªí1¡A¸Õ¦n´X¦¸¸ò¤£¦P¹q¸£¡A¸õ¥Xªº¿ù»~ÁÙ¬O¤@¼Ò¤@¼Ë¡A¤£ª¾¹D¤è¤£¤è«K«ô°UGBKEE¤jªºÀɮפW¶Ç¡C

¥ýÁÂÁ¤F¡C

¥t¥~¡A¤p¹q¸£¦³Äématlab link excel ©Ò¥H­nªá®É¶¡¶}¤@¤U¡A¤~³o»ò¤[¡C
§Ú¥Î¤p¹q¸£¨ÃÀˬdÄæ¦ì³£¦³¤@­P¡AÁÙ¬O¸õ¥X¤@¼Ò¤@¼Ëªº¿ù»~¡A·|¤£·|¬O­n­«·s½Æ»s¡A¶K¤W¼Æ­È®æ¦¡¤~¯à¶¶§Q¹B¦æ¡C¡A·|¤£·|¬O­n­«·s½Æ»s¡A¶K¤W¼Æ­È®æ¦¡¤~¯à¶¶§Q¹B¦æ¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-1-6 08:55 ½s¿è

¦^´_ 13# yagami12th
7#ÀÉ®×(¶·§R°£¤u§@ªí3 ²Ä¤@¦C) ´ú¸Õ ok ,§A¸Õ¸Õ¬Ý.  ¦p¤£¦æ¸Õ¸Õ ­×§ïªºµ{¦¡½X
  1. Option Explicit
  2. Sub Ex()
  3.     Dim E As Worksheet, i As Date, M As Variant, AR(), C As Variant
  4.     ReDim AR(1 To 5, 1 To 1)                               '²Ä¤@ºû ¦³5­Ó¤¸¯À ,²Ä¤Gºû ¦³1­Ó¤¸¯À
  5.     AR(1, 1) = "¤é´Á"
  6.     AR(2, 1) = "¶RÅv ³Ì¤j¥¼­Ü¶q"
  7.     AR(3, 1) = "¶RÅv ³Ì¤j¥¼¥­­Ü¶q¸¨¦b­þ­Ó¼i¬ù»ù"
  8.     AR(4, 1) = "½æÅv ³Ì¤j¥¼­Ü¶q"
  9.     AR(5, 1) = "½æÅv ³Ì¤j¥¼¥­­Ü¶q¸¨¦b­þ­Ó¼i¬ù»ù-"
  10.     Application.ScreenUpdating = False
  11.     For Each E In ActiveWorkbook.Sheets                     '§@¥Î¤¤ªº¬¡­¶Ã¯¤¤ªº ¤u§@ªí
  12.        If E.FilterMode Then E.AutoFilterMode = False         '¦³¿z¿ï®É ¨ú®ø[¿z¿ï]
  13.         For i = E.[a2] To E.[a2].End(xlDown)                 '¤é´Á[A2]ª½¨ì³Ì«áªº¤é´Á
  14.             E.AutoFilterMode = False
  15.             E.Range("A1").AutoFilter 1, i
  16.             If E.Range("A1").End(xlDown).Row <> Rows.Count Then   '¦]¤¤¶¡¦³¨S¥æ©ö¤é´Á[¿z¿ï]¤£¨ì¸ê®Æ
  17.                 ReDim Preserve AR(1 To 5, 1 To UBound(AR, 2) + 1) '²Ä¤Gºû ­ì¦³¤¸¯À¦A¥[1¤¸¯À
  18.                 AR(1, UBound(AR, 2)) = i                          '¤é´Á: i
  19.                 For Each C In Array("¶RÅv", "½æÅv")
  20.                     E.AutoFilterMode = False
  21.                     E.Range("A1").AutoFilter 1, i
  22.                     E.Range("A1").AutoFilter 5, C
  23.                     M = Application.Max(E.Range("L:L").SpecialCells(xlCellTypeVisible))
  24.                     AR(IIf(C = "¶RÅv", 2, 4), UBound(AR, 2)) = M              '³Ì¤j¥¼­Ü¶q
  25.                       'IIf(C = "¶RÅv", 2, 4)     C = "¶RÅv"->2  ,C <> "¶RÅv"-> 4
  26.                     Set M = E.Range("L:L").SpecialCells(xlCellTypeVisible).Find(M, LookIn:=xlValues)
  27.                     AR(IIf(C = "¶RÅv", 3, 5), UBound(AR, 2)) = M.Offset(, -8) '³Ì¤j¥¼¥­­Ü¶q¸¨¦b­þ­Ó¼i¬ù»ù
  28.                 Next
  29.             End If
  30.         Next
  31.     Next
  32.     Dim SaveName As String
  33.     With ActiveWorkbook            '§@¥Î¤¤ªº¬¡­¶Ã¯
  34.         SaveName = .Path & "\" & Format(.Sheets(1).[a2], "yyyy") & "¦~¿ï¾ÜÅv.xls" '¦sÀɸô®|¦WºÙ
  35.     End With
  36.     With Workbooks.Add(1).Sheets(1)    '·s¼W¬¡­¶Ã¯ [¦s©ñ¾ã²zªº¸ê®Æ]
  37.         .[A1].Resize(UBound(AR, 2), UBound(AR)) = Application.WorksheetFunction.Transpose(AR)
  38.         .Cells.EntireColumn.AutoFit
  39.         .Parent.SaveAs SaveName        '·s¼W¬¡­¶Ã¯¦sÀÉ
  40.     End With
  41.     Application.ScreenUpdating = True

  42. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ yagami12th ©ó 2012-1-6 10:56 ½s¿è

ÁÂÁÂGBKEE¤j¡A­è°õ¦æµ{¦¡½X¥X²{¸ò«e­±¤@¼Ëªº¿ù»~¡A      

For i = E.[a2] To E.[a2].End(xlDown)                 '¤é´Á[A2]ª½¨ì³Ì«áªº¤é´Á

xlDown<<·|¤£·|¬O³o¸ÌªºÃö«Y¡C

TOP

¦^´_ 15# yagami12th
MsgBox E.[a2]                          '¥[¤W¬Ý¬Ý¬O§_¦³¿ù»~
MsgBox E.[a2].End(xlDown)   '¥[¤W¬Ý¬Ý¬O§_¦³¿ù»~
For i = E.[a2] To E.[a2].End(xlDown)

TOP

¦^´_  yagami12th
MsgBox E.[a2]                          '¥[¤W¬Ý¬Ý¬O§_¦³¿ù»~
MsgBox E.[a2].End(xlD ...
GBKEE µoªí©ó 2012-1-6 11:04


¦^GBKEE¤j¡Aµ{¦¡½X¸g´ú¸Õ«á¡A¸õ¥Xa2Ä檺¤é´Á¸ò³Ì«á¤@Ä檺¤é´Á¬°12/16¸ò1/19ªºmsgboxµøµ¡«á¡A±µµÛ¥X²{«e­±©Ò´£ªº¹Bºâ¹L©ó½ÆÂøªº¿ù»~¡C

¦pªþÀɹϤ¤©Ò¥Ü¡G
¹ÏÀÉ.rar (831.52 KB)

TOP

¦^´_ 17# yagami12th
¯u¬O¤V¤Gª÷­è!!
Dim E As Worksheet, i As Date, M As Variant, AR(), C As Variant   §R±¼¸Õ¸Õ¬Ý
¦¨  Dim E As Worksheet, i , M As Variant, AR(), C As Variant
½Ð¦A¤W¶Ç§A´ú¸ÕªºÀÉ®× ¬Ý¬Ý

TOP

¦^GBKEE¤j ¡A¯uªº¤£¦n·N«ä¡A¤]«D±`·PÁ§A¡AÅý§A³o»ò³Â·Ð¡A§ï¤F­è­è²Ä¤@¦æªºµ{¦¡½X¤§«á¥i¥H¹B¦æ¤F¡A¦ýÅܦ¨¦Û°Ê¿z¿ï±Æ§Çªºµøµ¡®æ¦¡¡A¤£ª¾¬O§_¬O¥¿±`¡C

ªþ¥ó¦p¤U¡G
¥¼°õ¦æªº2011¦~ªñ¤ë¿ï¾ÜÅv.rar (640.67 KB)
°õ¦æ«á2011¦~ªñ¤ë¿ï¾ÜÅv.rar (644.24 KB)

TOP

¦^´_ 19# yagami12th
¤U¸ü [°õ¦æ«á2011¦~ªñ¤ë¿ï¾ÜÅv.xlsm] ¥´¶}¤@¬Ý ¤u§@ªíªºµe­±³£¬O¿z¿ï¤£¨ì¸ê®Æ  ³o¤£¤Ó¹ï (À³¬O¥iÅã¥Ü³Ì«á¿z¿ï¨ìªº ¸ê®Æ)  
*** E.[a2].End(xlDown) ¬O³Ì«á¤@­Ó¤é´Á (¤@©w¦³¸ê®Æ) ****                  ·d¤£²M·¡.
§Ú­«·s°õ¦æ [°õ¦æ«á2011¦~ªñ¤ë¿ï¾ÜÅv.xlsm] «á ¤u§@ªíªºµe­±³£¬O¯d¦bÅã¥Ü ¿z¿ï¨ì³Ì«á E.[a2].End(xlDown)ªº¸ê®Æ
§Ú2003¤É¯Å ¨ì¥i¹B¦æ 2007ÀɮצӤw,ÁÙ¬O2003ª©¥»,¥i½Ð¦³ 2007 ª©ªº´ú¸Õ¼I¸Ñ.

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD