Sub 汇总()
Dim strPath As String
Dim MySht As String
Dim MyWK As Workbook
strPath = ThisWorkbook.Path
For I = 2 To 2001
If Cells(2, I) = "" Then
Exit For
Else
Set MyWK = Workbooks.Open(strPath & "\" & Cells(2, I) & ".xlsx") ''请注意你的EXCEL档案存放的路径
ARR = Range("B2:B7") ''注意你要复制的资料范围
End If
MyWK.Close
Cells(3, I).Resize(6, 1) = ARR
Next
End Sub
温馨提示:答案为网友推荐,仅供参考