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

[µo°Ý] «ü©w¸ê®Æ§¨ALL-EXCEL¦Û°Ê·J¾ã¦ÜÁ`ªí¤è¦¡-¨ÌÀɦW¦Û°ÊÅܧó¤u§@ªí¦WºÙ

[µo°Ý] «ü©w¸ê®Æ§¨ALL-EXCEL¦Û°Ê·J¾ã¦ÜÁ`ªí¤è¦¡-¨ÌÀɦW¦Û°ÊÅܧó¤u§@ªí¦WºÙ

DEAR ALL ¤j¤j
1.¦p¹Ï¤@µ{¦¡·|±N"«ü©w¸ê®Æ§¨ALL-EXCEL ¤§ALL  SHEET ¦Û°Ê·J¾ã¦ÜÁ`ªíEXCEL-¨ÌÀɦW¦Û°ÊÅܧó¤u§@ªí¦WºÙ"
2.¦ý¤p§Ì­Y¶È»Ý ALL EXCEL ¤§ SHEET3¤§¤u§@ªí·J¾ã¦ÜÁ`ªíEXCEL.(¨ä¾lSHEET1  SHEET2 SHEET4...¤£»Ý­n·J¾ã)
3.½Ð°Ý¸Ó¦p¦ó­×§ï.·Ð¤£§[½ç±Ð.THANKS*10000   
¹Ï¤@
Sub yy()
  Dim a As Workbook, f$, fn$, k%
  Dim p$, Sh As Worksheet
  Set a = ThisWorkbook
  p = "C:\AAA\"
  f = Dir(p & "*.xls")
  Application.ScreenUpdating = False
  Do While f <> ""
    Workbooks.Open p & f
    k = 0
    For Each Sh In Worksheets
      If Not IsEmpty(Sh.UsedRange) Then
      fn = IIf(k = 0, Replace(f, ".xls", ""), Replace(f, ".xls", "_") & k)
      Sh.Copy after:=a.Sheets(a.Sheets.Count)
      ActiveSheet.Name = fn
      k = k + 1
      End If
    Next
    Windows(f).Close True
    f = Dir
  Loop
  Application.ScreenUpdating = True
End Sub
ù

¦b°j°é¤º«þ¨©Sheet«e¥[­Ó§PÂ_¦¡À³¸Ó´N¥i¥H¤F :

    For Each sh In Worksheets
If sh.Name = "SHEET3" Then
      If Not IsEmpty(sh.UsedRange) Then
...
      End If
End If
    Next

TOP

DEAR luhpro ¤j¤j
1.¨Ï¥Î If sh.Name = "¤u§@ªí¦WºÙ" Then
   ¥i¨Ï¥ÎALL EXCEL ¤§ SHEET3 ¤§¤u§@ªí¦WºÙ³£¬Û¦P¤§½d¨Ò
2.¦ý§Ú¤§ALL EXCEL »Ý·J¾ã¤§¸ê®Æ³£©ñ©óSHEET3¤º¦ýÀɦW¤£¦P.
   ¬GµLªk¥HÀɦW¬°KEY.¥u¯à¥HSHEET3¬°KEY
  ¨Ò: A EXCEL ¬° SHEET3(AAA)
       B EXCEL ¬° SHEET3(BBB).....
3.·Ð¦A¤£§[½ç±Ð  THANKS*10000
ù

TOP

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