|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub lkyy()
Dim wb As Workbook, Mp$, Mf
Mp = ThisWorkbook.Path & "\"
Mf = Dir(Mp & "*.xlsx")
ReDim br(1 To 500, 1 To 10)
Do While Mf <> ""
With Workbooks.Open(Mp & Mf)
n = n + 1
ar = .Sheets("Page 1").Range("a1").CurrentRegion
br(n, 1) = ar(3, 2)
br(n, 2) = ar(4, 2)
For i = 3 To 9
br(n, i) = ar(i + 3, 2)
Next
For i = 14 To 30
If i = 14 Then s = ar(i, 1) Else s = s & "|" & ar(i, 1)
Next
br(n, 10) = s
.Close 0
End With
Mf = Dir()
Loop
Range("a2:j1000").ClearContents
Range("a2").Resize(n, 10) = br
End Sub |
评分
-
1
查看全部评分
-
|