|
- Sub 汇总()
- Application.ScreenUpdating = False
- Set fso = CreateObject("scripting.filesystemobject")
- Dim brr(1 To 1000, 1 To 4)
- p = ThisWorkbook.Path & ""
- For Each fs In fso.getfolder(p).subfolders
- For Each f In fso.getfolder(fs & "").Files
- If InStr(f.Name, "账单") Then
- n = n + 1
- With GetObject(f)
- arr = .Sheets(1).UsedRange
- .Close 0
- End With
- brr(n, 1) = arr(1, 2)
- brr(n, 2) = arr(2, 2)
- brr(n, 3) = arr(5, 4)
- brr(n, 4) = arr(5, 2)
- End If
- Next
- Next
- With Sheets("sheet1")
- .UsedRange.Offset(1).ClearContents
- .[a2].Resize(n, 4) = brr
- End With
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|