|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub hebing()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim d As Object
Set d = CreateObject("scripting.dictionary")
For Each sh In Sheets
d(sh.Name) = ""
Next sh
f = Dir(ThisWorkbook.Path & "\数据源G0103_200630\*.xls*")
Do While f <> ""
Set wb = Workbooks.Open(ThisWorkbook.Path & "\数据源G0103_200630\" & f, 0)
mc = Replace(Split(wb.Name, "_")(1), "市分行", "")
If d.exists(mc) Then
wb.Worksheets(1).Cells.Copy ThisWorkbook.Worksheets(mc).[a1]
End If
wb.Close False
f = Dir
Loop
Application.ScreenUpdating = True
Application.DisplayAlerts = True
MsgBox "ok!"
End Sub
|
|