|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
ub ss()
Filename = Application.GetOpenFilename
a = VBA.InStrRev(Filename, "\")
folder = Left(Filename, a)
Filename = Dir(folder)
k = 2
m = 1
Do While Filename <> ""
Set wb = Workbooks.Open(folder & Filename)
bb = wb.Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row
wb.Worksheets(1).Range("a2:d" & bb).Copy Cells(k, 2)
For i = k To k + bb - 2
Cells(i, 1) = m
Next
m = m + 1
k = k + bb
wb.Close
Filename = Dir
Loop
Cells(1, 1) = "文件"
Cells(1, 2) = "Sessions"
Cells(1, 3) = "Session Percentage"
Cells(1, 4) = "Page Views"
Cells(1, 5) = "Page Views Percentage"
End Sub
|
|