|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST2()
Dim ar, br, cr, i&, j&, n&
Application.ScreenUpdating = False
ar = Worksheets(1).[A1].CurrentRegion.Value
ReDim br(1 To UBound(ar), 1 To 10 ^ 3) As String
With Worksheets(2)
For i = 1 To UBound(ar)
cr = Split(ar(i, 1))
n = 0
For j = 0 To UBound(cr)
If Len(cr(j)) Then n = n + 1: br(i, n) = cr(j)
Next j
br(i, 2) = Mid(br(i, 2), 3, 3)
br(i, 3) = Mid(br(i, 4), 8, 3)
br(i, 4) = Mid(br(i, 5), 6, 2)
br(i, 5) = Mid(br(i, 6), 5, 8)
br(i, 6) = br(i, 8)
br(i, 7) = br(i, 9) & " " & br(i, 10)
Next i
.Cells.Clear
.[A1].Resize(UBound(br), 7) = br
.Activate
End With
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|