|
楼主 |
发表于 2023-3-1 13:21
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub ykcbf2() '//2023.3.1
Dim arr, brr(1 To 1000, 1 To 8)
With Sheets("Ô-±í")
r = .Cells(.Rows.Count, "a").End(xlUp).Row
arr = .[a1].Resize(r, 1)
End With
For i = 9 To UBound(arr) Step 11
m = m + 1
brr(m, 1) = arr(i, 1) & arr(i + 1, 1)
brr(m, 2) = arr(i + 2, 1)
brr(m, 3) = arr(i + 3, 1)
brr(m, 4) = arr(i + 4, 1)
brr(m, 5) = arr(i + 5, 1)
brr(m, 6) = arr(i + 6, 1) & " " & arr(i + 7, 1)
brr(m, 7) = arr(i + 8, 1)
brr(m, 8) = arr(i + 9, 1) & arr(i + 10, 1)
Next
With Sheets("D§1û")
.UsedRange.Offset(1) = ""
.[a2].Resize(m, 8) = brr
.[a1].Resize(m + 1, 8).Borders.LineStyle = 1
End With
End Sub
|
|