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

[µo°Ý] ¦hµ§excel¸ê®Æ¾ã²z¨ì·sªºexcelÀÉ

[µo°Ý] ¦hµ§excel¸ê®Æ¾ã²z¨ì·sªºexcelÀÉ

§â¦hµ§excel¦WºÙ¬°¼Æ¦r(¦p¤U¹Ï)¥B¤£³sÄòªºÀÉ®×¾ã¦X¨ì¦P¤@­ÓexcelÀÉ
(¦hµ§excelÀɮפº®e®æ¦¡³£¤@¼Ë¡A¥u¦³¼Æ­È¤£¦P)

¥Bexcel¤º®e¦p¤U¹Ï

·Q§â¨Cµ§excelªºB87:B107ªº¸ê®ÆÂà¸m¨ì·sªºexcelÀÉ
¨Ã§âB106:B287°µ¥­§¡¨ú­È¤]½Æ»s¨ì·sªºexcelÀÉ(µ²ªG¦p¤U¹Ï)

ºñ¦â¬°¦hµ§¸ê®ÆªºÀɦW¡A¶À¦â¬°B106:B287°µ¥­§¡¨ú­È¡A¬õ¦â¬°B87:B107ªºÂà¸m¸ê®Æ

³Â·Ð¤j¤j¸Ñµª¤F~! ³o¹ï¤p§Ì«Ü­«­n

§â¦hµ§excel¦WºÙ¬°¼Æ¦r(¦p¤U¹Ï)¥B¤£³sÄòªºÀÉ®×¾ã¦X¨ì¦P¤@­ÓexcelÀÉ
(¦hµ§excelÀɮפº®e®æ¦¡³£¤@¼Ë¡A¥u¦³¼Æ ...
smart00361 µoªí©ó 2014-11-20 16:45
  1. Sub nn()
  2.   Dim lRow&
  3.   Dim sFlNm$
  4.   Dim shTar As Worksheet
  5.   
  6.   Set shTar = ThisWorkbook.Sheets(1)
  7.   With shTar
  8.     .Cells.Clear
  9.     .[A1].Select
  10.   End With
  11.   sFlNm = Dir("*.xls")
  12.   lRow = 2
  13.   Do While sFlNm <> ""
  14.     With Workbooks.Open(sFlNm, , 1)
  15.       shTar.Activate
  16.       With .Sheets(1).Cells(lRow, 1)
  17.         shTar.Cells(lRow, 1) = Left(sFlNm, Len(sFlNm) - 4)
  18.         shTar.Cells(lRow, 2) = Application.Sum(.Parent.Range("B106:B287")) / 182
  19.         .Range("B87:B107").Copy
  20.         shTar.Cells(lRow, 3).PasteSpecial Transpose:=True
  21.       End With
  22.       .Close False
  23.     End With
  24.     sFlNm = Dir
  25.     lRow = lRow + 1
  26.   Loop
  27. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# luhpro

¤j¤jÁÂÁ±z¡AÃö©ó¤W­±ªºcode §Ú§ä¤£¨ìŪÀɸô®|¡A½Ð°Ý»Ý­n­×§ï­þ¸Ì?

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2014-11-23 03:22 ½s¿è
¦^´_  luhpro

¤j¤jÁÂÁ±z¡AÃö©ó¤W­±ªºcode §Ú§ä¤£¨ìŪÀɸô®|¡A½Ð°Ý»Ý­n­×§ï­þ¸Ì?
smart00361 µoªí©ó 2014-11-22 23:11

Dim sPath$

´¡¦b²Ä 11 ¦æ«e­± :

sPath = "C:\test"
ChDrive sPath
ChDir sPath
sFlNm = Dir("*.xls")

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD