|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST2()
Dim ar, br, cr, i&, j&, r&
Application.ScreenUpdating = False
r = Cells(Rows.Count, "I").End(xlUp).Row
ar = Range("I2:I" & r).Value
ReDim br(1 To UBound(ar), 1 To 7) As String
r = 0
For i = 10 To UBound(ar) - 2
cr = Split(ar(i, 1), "|")
r = r + 1
For j = 1 To UBound(br, 2)
br(r, j) = Trim(cr(j))
Next j
If Right(br(r, 6), 1) = "-" Then br(r, 6) = "-" & Format(Val(br(r, 6)), "0.00")
Next i
[A1].CurrentRegion.Offset(1).Clear
[A2].Resize(r, UBound(br, 2)) = br
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|