|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub test()
Dim mypath$, mywb$, wb As Object, sht As Worksheet, arr(1 To 18, 1 To 3), i&, n&, sj$
mypath = ThisWorkbook.Path & "\"
mywb = mypath & "资源.xls"
Set wb = GetObject(mywb)
For Each sht In wb.Sheets
If sht.Name <> "首页" And sht.Name <> "尾页" Then
With sht
arr(1, i) = .[H33]
arr(2, i) = .[B33]
arr(3, i) = .[B30]
arr(13, i) = .[I35]
arr(14, i) = .[I36]
arr(15, i) = .[F46]
arr(16, i) = .[F47]
arr(17, i) = .[F48]
arr(18, i) = .[D49]
For n = 4 To 12
arr(n, i) = .Cells(31 + n, 4)
Next n
End With
End If
i = i + 1
Next
ThisWorkbook.Sheets("内容").Range("A5:R7") = WorksheetFunction.Transpose(arr)
End Sub
|
评分
-
1
查看全部评分
-
|