- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 197
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-9-7
![2023¦~¥þ¶Ô¼ú³¹ 2023¦~¥þ¶Ô¼ú³¹](images/common/2023.png) ![2022ªê¦~¥þ¶Ô¼ú³¹ 2022ªê¦~¥þ¶Ô¼ú³¹](images/common/hu.gif) ![2021¤û¦~¥þ¶Ô¼ú³¹ 2021¤û¦~¥þ¶Ô¼ú³¹](images/common/niu.gif) ![2020¹«¦~¥þ¶Ô¼ú³¹ 2020¹«¦~¥þ¶Ô¼ú³¹](images/common/shu.gif) ![2019 ½Þ¦~¥þ¶Ô¼ú³¹ 2019 ½Þ¦~¥þ¶Ô¼ú³¹](images/common/zhu.gif) ![2018 ª¯¦~¥þ¶Ô¼ú³¹ 2018 ª¯¦~¥þ¶Ô¼ú³¹](images/common/gou.gif) ![2017 Âû¦~¥þ¶Ô¼ú³¹ 2017 Âû¦~¥þ¶Ô¼ú³¹](images/common/ji.gif) ![2016µU¦~¥þ¶Ô¼ú³¹ 2016µU¦~¥þ¶Ô¼ú³¹](images/common/hou.gif) ![2015¦Ï¦~¥þ¶Ô¼ú³¹ 2015¦Ï¦~¥þ¶Ô¼ú³¹](images/common/yang.gif) ![2014°¨¦~¥þ¶Ô¼ú³¹ 2014°¨¦~¥þ¶Ô¼ú³¹](images/common/ma.gif) ![2013³D¦~¥þ¶Ô¼ú³¹ 2013³D¦~¥þ¶Ô¼ú³¹](images/common/she.gif) ![2012Às¦~¥þ¶Ô¼ú³¹ 2012Às¦~¥þ¶Ô¼ú³¹](images/common/long.gif) ![½×¾Â°^Äm¾±³¹ ½×¾Â°^Äm¾±³¹](images/common/medal5.gif) ![¼ö¤ß¤½¯q¾±³¹ ¼ö¤ß¤½¯q¾±³¹](images/common/medal15.gif) ![2011¨ß¦~¥þ¶Ô¼ú³¹ 2011¨ß¦~¥þ¶Ô¼ú³¹](images/common/tu.gif)
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-3-19 11:01 ½s¿è
¦^´_ 11# amychlo
³o¼Ë´N«ÜÃø§PÂ_¿ù»~¥X¦bþ¸Ì
¥[¤J©³¤U¬õ¦r³¡¤À¬Ý¬Ý
¦pªGÁÙ¤£¦æ³Ì¦n±N3ÀɮפW¶Ç´ú¸Õ¬Ý¬Ý
Sub ·J¾ã()
Dim Ar()
Set d = CreateObject("Scripting.Dictionary")
fd = ThisWorkbook.Path & "\" '3ÓÀɮשñ¦b¦P¥Ø¿ý¤¤
'fd="D:\" '«ü©wA¡BB2Àɮתº¦s©ñ¥Ø¿ý
fs = Array("A.xls", "B.xls")
d("³W®æ") = "¼Æ¶q"
For Each f In fs
With Workbooks.Open(fd & f)
With .Sheets(1)
i = i + 1
ReDim Preserve Ar(2, s)
Ar(0, s) = "³W®æ": Ar(1, s) = "¼Æ¶q"
s = s + 1
.UsedRange.Copy ThisWorkbook.Sheets(i).[A1]
With ThisWorkbook.Sheets(i)
For Each a In .Range(.[B2], .[B2].End(xlDown))
mystr = Mid(a, 1 / (i / 2))
If IsEmpty(d(mystr)) Then d(mystr) = a.Offset(, IIf(i = 1, 7, 2)) Else d(mystr) = a.Offset(, IIf(i = 1, 7, 2)) - d(mystr)
ReDim Preserve Ar(2, s)
Ar(0, s) = mystr: Ar(1, s) = a.Offset(, IIf(i = 1, 7, 2)).Value
s = s + 1
Next
ThisWorkbook.Sheets(3).[A1].Offset(, (i - 1) * 2).Resize(s, 2) = Application.Transpose(Ar)
Erase Ar: s = 0
End With
End With
.Close 0
End With
Next
With Sheets(3)
.[E1].Resize(d.Count, 1) = Application.Transpose(d.keys)
.[F1].Resize(d.Count, 1) = Application.Transpose(d.items)
End With
End Sub |
|